ML-powered Streamlit app predicting used car prices in South Africa. Features interactive dashboards, brand comparisons, and XGBoost-based price estimation with confidence intervals. Built for data science capstone project.
# Car Price Predictor 🏎
A machine learning web application built with Streamlit that predicts car resale values based on vehicle characteristics. The model analyzes factors like brand, mileage, engine specifications, and age to estimate market prices for used cars in the South African market.
## Features
- **Interactive Price Prediction**: Input car details and get instant price estimates with confidence intervals
- **Data Visualization Dashboard**: Explore market trends, brand comparisons, and feature correlations
- **Comprehensive Analysis**: View insights on fuel economy, transmission types, and brand performance metrics
- **User-Friendly Interface**: Clean, intuitive design with guided navigation
## How It Works
1. Users input vehicle details (brand, year, mileage, fuel type, etc.)
2. The XGBoost model processes the data through feature engineering and scaling
3. Predicted retail value is returned with a margin of error based on statistical confidence intervals
## Tech Stack
- **Frontend**: Streamlit
- **Data Processing**: Pandas, NumPy
- **Visualization**: Plotly, Seaborn, Matplotlib
- **Machine Learning**: XGBoost, scikit-learn
- **Model Serialization**: Joblib
## Installation
1. Clone the repository:
```bash
git clone
github.com
cd car-price-predictor
```
2. Install required dependencies:
```bash
pip install -r requirements.txt
```
3. Ensure you have the following files in the root directory:
- `cardekho_dataset.csv` (training data)
- `scaler.pkl` (fitted StandardScaler)
- `Best_model.xgb` (trained XGBoost model)
- `X_train_scaled.npy` (scaled training features)
- `Y_train.npy` (training labels)
## Usage
Run the Streamlit app:
```bash
streamlit run Home.py
```
Navigate through the pages:
- **Home**: Introduction and FAQs about car valuation
- **Dashboard**: Explore visualizations and market insights
- **Prediction**: Get price estimates for specific vehicles
## Model Details
- **Algorithm**: XGBoost …