# rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes architecture

> Architecture diagram of the GitHub repository rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes
- Repository: https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes

## Overview

This project turns customer clothing reviews into a binary recommendation classifier and exposes the saved model through a Streamlit dashboard. Its documented workflow runs from dataset cleaning through feature preparation and model selection to live prediction. The README describes the notebook stages and dashboard capabilities; source excerpts confirm model-resource loading and dashboard navigation, but do not expose the prediction-call implementation, so that wiring is based on README documentation.

Main entry points: [`src/app.py`](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py) (Streamlit dashboard), [`notebooks/02_preprocessing_encoding.ipynb`](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/02_preprocessing_encoding.ipynb) (Feature preparation), [`notebooks/03_classification_models.ipynb`](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/03_classification_models.ipynb) (Model comparison), [`models/preprocessor.pkl`](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/preprocessor.pkl) (Saved preprocessor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_raw_reviews[("Raw reviews<br/>[reviews.csv]")]
  node_cleaning["EDA and cleaning"]
  node_clean_reviews[("Clean reviews<br/>[reviews_clean.csv]")]
  node_preparation["Feature preparation"]
end

subgraph group_training["Model training"]
  node_preprocessor["Saved preprocessor<br/>[preprocessor.pkl]"]
  node_review_tfidf["Review TF-IDF<br/>[review_tfidf.pkl]"]
  node_title_tfidf["Title TF-IDF<br/>[title_tfidf.pkl]"]
  node_modeling["Model comparison"]
  node_best_model["Linear SVC model<br/>[best_model.pkl]"]
end

subgraph group_app["Interactive application"]
  node_streamlit_app["Streamlit dashboard<br/>[app.py]"]
  node_live_input["Review and product details<br/>[app.py]"]
  node_prediction["Recommendation result<br/>[app.py]"]
  node_performance["Model performance<br/>[app.py]"]
  node_statistics["Dataset statistics<br/>[app.py]"]
  node_insights["Key findings<br/>[app.py]"]
  node_about["Project information<br/>[app.py]"]
end

node_analyst(("Project analyst"))
node_customer(("Dashboard user"))

node_analyst -->|"supplies dataset"| node_raw_reviews
node_raw_reviews -->|"reads and cleans"| node_cleaning
node_cleaning -->|"saves cleaned data"| node_clean_reviews
node_clean_reviews -->|"feeds preparation"| node_preparation
node_preparation -->|"saves transformer"| node_preprocessor
node_preparation -->|"saves vectorizer"| node_review_tfidf
node_preparation -->|"saves vectorizer"| node_title_tfidf
node_preprocessor -->|"transforms features"| node_modeling
node_review_tfidf -->|"vectorizes reviews"| node_modeling
node_title_tfidf -->|"vectorizes titles"| node_modeling
node_modeling -->|"saves selected model"| node_best_model
node_customer -->|"uses dashboard"| node_streamlit_app
node_streamlit_app -->|"loads and applies"| node_preprocessor
node_streamlit_app -->|"loads and predicts"| node_best_model
node_customer -->|"enters review"| node_live_input
node_live_input -->|"submits input"| node_streamlit_app
node_streamlit_app -->|"shows prediction"| node_prediction
node_streamlit_app -->|"displays comparison"| node_performance
node_streamlit_app -->|"displays distributions"| node_statistics
node_streamlit_app -->|"displays findings"| node_insights
node_streamlit_app -->|"displays project details"| node_about

click node_raw_reviews "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/data/raw/reviews.csv"
click node_cleaning "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/01_eda_and_cleaning.ipynb"
click node_clean_reviews "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/data/processed/reviews_clean.csv"
click node_preparation "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/02_preprocessing_encoding.ipynb"
click node_preprocessor "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/preprocessor.pkl"
click node_review_tfidf "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/review_tfidf.pkl"
click node_title_tfidf "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/title_tfidf.pkl"
click node_modeling "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/03_classification_models.ipynb"
click node_best_model "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/best_model.pkl"
click node_streamlit_app "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"
click node_live_input "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"
click node_prediction "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"
click node_performance "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"
click node_statistics "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"
click node_insights "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"
click node_about "https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_raw_reviews,node_cleaning,node_clean_reviews,node_preparation,node_customer toneBlue
class node_preprocessor,node_review_tfidf,node_title_tfidf,node_modeling,node_best_model toneAmber
class node_streamlit_app,node_live_input,node_prediction,node_performance,node_statistics,node_insights,node_about toneMint
class node_analyst toneIndigo
```

## Components

### Data preparation

- [Raw reviews](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/data/raw/reviews.csv): `data/raw/reviews.csv`
- [EDA and cleaning](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/01_eda_and_cleaning.ipynb): `notebooks/01_eda_and_cleaning.ipynb`
- [Clean reviews](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/data/processed/reviews_clean.csv): `data/processed/reviews_clean.csv`
- [Feature preparation](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/02_preprocessing_encoding.ipynb): `notebooks/02_preprocessing_encoding.ipynb`

### Model training

- [Saved preprocessor](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/preprocessor.pkl): `models/preprocessor.pkl`
- [Review TF-IDF](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/review_tfidf.pkl): `models/review_tfidf.pkl`
- [Title TF-IDF](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/title_tfidf.pkl): `models/title_tfidf.pkl`
- [Model comparison](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/notebooks/03_classification_models.ipynb): `notebooks/03_classification_models.ipynb`
- [Linear SVC model](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/models/best_model.pkl): `models/best_model.pkl`

### Interactive application

- [Streamlit dashboard](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`
- [Review and product details](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`
- [Recommendation result](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`
- [Model performance](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`
- [Dataset statistics](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`
- [Key findings](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`
- [Project information](https://github.com/rsd018/prediction-des-recommandations--dachats--de-vetements--pour--femmes/blob/main/src/app.py): `src/app.py`

### Other components

- **Project analyst**
- **Dashboard user**

## Connections

- Project analyst → Raw reviews: supplies dataset
- Raw reviews → EDA and cleaning: reads and cleans
- EDA and cleaning → Clean reviews: saves cleaned data
- Clean reviews → Feature preparation: feeds preparation
- Feature preparation → Saved preprocessor: saves transformer
- Feature preparation → Review TF-IDF: saves vectorizer
- Feature preparation → Title TF-IDF: saves vectorizer
- Saved preprocessor → Model comparison: transforms features
- Review TF-IDF → Model comparison: vectorizes reviews
- Title TF-IDF → Model comparison: vectorizes titles
- Model comparison → Linear SVC model: saves selected model
- Dashboard user → Streamlit dashboard: uses dashboard
- Streamlit dashboard → Saved preprocessor: loads and applies
- Streamlit dashboard → Linear SVC model: loads and predicts
- Dashboard user → Review and product details: enters review
- Review and product details → Streamlit dashboard: submits input
- Streamlit dashboard → Recommendation result: shows prediction
- Streamlit dashboard → Model performance: displays comparison
- Streamlit dashboard → Dataset statistics: displays distributions
- Streamlit dashboard → Key findings: displays findings
- Streamlit dashboard → Project information: displays project details
