Interactive Django dashboard for a synthetic vehicle dataset, featuring ML-powered price prediction, client segmentation, and folium maps (Rwanda districts + global country distribution).
## Vehicle ML Dashboard (Django + Scikit‑learn)
This project is a small end‑to‑end machine learning dashboard built with **Django** and **scikit‑learn**. It loads a synthetic vehicle dataset, trains several ML models, and exposes them through a simple web UI with **EDA tables** and **geospatial visualizations**.
### Main Features
- **Exploratory Data Analysis (EDA)**
- Dataset head and basic description rendered as HTML tables.
- Implemented in `predictor/data_exploration.py` and shown on the `/data_exploration/` page (`index.html`).
- **Regression model – Price prediction**
- Predicts vehicle selling price from features such as `year`, `kilometers_driven`, `seating_capacity` and `estimated_income`.
- Trained in `model_generators/regression/train_regression.py` and served via `predictor/views.regression_analysis`.
- Uses an `r2_score` (expressed as a percentage) to evaluate performance.
- **Classification model – Price segment**
- Classifies a vehicle into price/segment classes.
- Trained in `model_generators/classification/train_classifier.py` and served via `predictor/views.classification_analysis`.
- Uses `accuracy_score` (percentage) to evaluate performance.
- **Clustering model – Client segmentation**
- Unsupervised clustering of clients based on multiple numerical features such as `estimated_income`, `selling_price`, `kilometers_driven`, and `year`.
- Implemented in `model_generators/clustering/train_cluster_improved.py`.
- Uses **KMeans** on standardized numerical features and computes a **Silhouette Score** to quantify how well-separated the discovered clusters are in this feature space.
- Clusters are mapped to human‑friendly classes: `Economy`, `Standard`, `Premium`.
- Exposed through `predictor/views.clustering_analysis`.
- **Geospatial visualizations**
- **Rwanda map** (`predictor/rwanda_map.py`)
- Uses a local GeoJSON file `predictor/data/rwa_adm2_simplified.geojson`.
- `create_rwanda_map_with_districts(df)`:
- Coun …