How novafluz/used-car-price-prediction works
This repository is a used-car price prediction project. Its main workflow loads vehicle records, cleans and engineers features, prepares a train/test split and encoded inputs, trains three regression models, then accepts vehicle details and predicts a price with XGBoost. A separate evaluation command reports R², RMSE, and MAE. The README also describes exploratory analysis. The workflow links below are grounded in the excerpts and README; unsampled notebook behavior is not inferred.
Main entry points: application.py Prediction application · train.py Model training · preprocessing.py Preprocessing · loadData.py CSV loader
Components 19
Vehicle Data
- Used-car records
data/used_cars.csv - Exploratory analysis
notebooks/exploration.ipynb - CSV loader
src/loadData.py
Data Preparation
- Data cleaning
src/data_cleaning.py - Feature engineering
src/feature_engineering.py - Preprocessing
src/preprocessing.py - Train/test split
src/preprocessing.py - Scaling and encoding
src/preprocessing.py
Modeling
- Model training
src/train.py - Linear regression
src/train.py - Random forest
src/train.py - XGBoost regressor
src/train.py
Prediction and Evaluation
- CLI entry point
main.py - Prediction application
src/application.py - Vehicle details
src/application.py - Model evaluation
src/evaluate.py - R² RMSE MAE
src/evaluate.py - Predicted price
src/application.py
Other components
- User
Connections 22
- Used-car records → CSV loader: read by
src/loadData.py - Used-car records → Exploratory analysis: analyzed in
README.md - CLI entry point → Prediction application: starts
main.py - User → Prediction application: provides details
src/application.py - Prediction application → Model training: trains models
src/application.py - Prediction application → CSV loader: loads records
src/application.py - Prediction application → Preprocessing: transforms input
src/application.py - Prediction application → XGBoost regressor: predicts with
src/application.py - Prediction application → Predicted price: prints
src/application.py - Model training → CSV loader: loads records
src/train.py - Model training → Preprocessing: prepares data
src/train.py - Preprocessing → Data cleaning: cleans with
src/preprocessing.py - Preprocessing → Feature engineering: engineers with
src/preprocessing.py - Preprocessing → Train/test split: splits data
src/preprocessing.py - Preprocessing → Scaling and encoding: scales and encodes
src/preprocessing.py - Model training → Linear regression: fits
src/train.py - Model training → Random forest: fits
src/train.py - Model training → XGBoost regressor: fits
src/train.py - Model evaluation → Model training: gets trained models
src/evaluate.py - Model evaluation → R² RMSE MAE: calculates
src/evaluate.py - User → Vehicle details: enters details
src/application.py - Vehicle details → Prediction application: supplies fields
src/application.py