Live Application: Try the Interactive Valuation Dashboard
The secondary vehicle market in Zimbabwe often suffers from price opacity and significant valuation asymmetry. This project implements an end-to-end machine learning pipeline that extracts live marketplace listings, trains a non-linear pricing model, and serves an interactive web interface designed to assist buyers in identifying fair market values and arbitrage opportunities.
-
Data Acquisition & Engineering: Scraped 600+ pages across local automobile classifieds using
BeautifulSoupandRequests. Standardized 3,000+ unstructured records, engineered vehicle lifespan metrics (e.g.,Annual_Mileage), and segmented vehicles into distinct pricing clusters. - Predictive Modeling: Trained an XGBoost Regressor using a target Log-Transformation ($y = \log(1 + \text{Price})$) to eliminate overvaluation on budget vehicles.
-
Hyperparameter Tuning: Applied
Optunaacross 60 trials with 5-fold cross-validation to optimize learning rates, tree depth, and L1/L2 regularization terms. -
Deployment & User Experience: Developed a interactive
Gradiointerface featuring dynamic cascading dropdowns (Make$\rightarrow$ Model filtering), real-time pricing inference, system trust confidence profiles, and negotiation floor/ceiling bounds.
-
Variance Explained (
$R^2$ ): 0.790 (~79% of cross-market price variance explained). - Mean Absolute Error (MAE): ~$5,112 USD baseline error across all market tiers.
-
Statistical Governance: Integrated a residual Z-score filter (
$\pm3\sigma$ ) to automatically flag data entry errors and extreme structural damage risks.
├── data/ # Raw and processed datasets
│ └── unified_zimbabwe_car_market.csv
├── models/ # Serialized model and encoder binaries
│ ├── zimauto_xgb_log_model.pkl
│ └── le_*.pkl
├── notebooks/ # EDA, Feature Engineering, & Training scripts
├── app.py # Main Gradio deployment script
├── requirements.txt # Environment dependencies
└── README.md # Project documentation