How adipthadissanayake/used_car_price_prediction_system works
This is an end-to-end used-car valuation product: vehicle details enter through a web interface, are validated and passed to a prediction service, and return as a price estimate with a confidence interval and interpretability insights. Authenticated users can also save and manage valuation history. A separate model-development workflow cleans and transforms data, trains and tunes regressors, compares candidates, and exports the champion model used by inference. Several links reflect README documentation or the SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: processed Train/test datasets · main.py REST API · preprocessing.py Feature transformation · service.py Prediction service
Components 18
Valuation interface
- Web interface
frontend/app.js
API and accounts
- REST API
backend/main.py - Payload validation
backend/schemas.py - JWT authentication
backend/auth.py - User and history store
backend/database.py
Prediction runtime
- Prediction service
backend/service.py
Model development
- Linear regression
models/linear_regression.py - Decision tree
models/decision_tree.py - Random forest
models/random_forest.py - Gradient boosting
models/gradient_boosting.py - Hyperparameter tuning
tuning/tuning.py - Model evaluation
evaluation/model_comparison.py - Model artifacts
artifacts/models
Data preparation
- Feature transformation
preprocessing/preprocessing.py - Raw vehicle dataset
data/raw/used_cars.csv - Train/test datasets
data/processed - Fitted preprocessor
artifacts/preprocessing/preprocessor.joblib
Other components
- Valuation user
Connections 19
- Valuation user → Web interface: enters vehicle details
README.md - Web interface → REST API: requests valuation
README.md - REST API → Payload validation: validates payload
backend/main.py - REST API → JWT authentication: verifies tokens
backend/main.py - REST API → Prediction service: requests inference
backend/main.py - REST API → User and history store: records and retrieves history
backend/main.py - Prediction service → Feature transformation: uses feature logic
backend/service.py - Raw vehicle dataset → Feature transformation: provides source data
README.md - Feature transformation → Train/test datasets: exports splits
README.md - Feature transformation → Fitted preprocessor: saves fitted state
README.md - Train/test datasets → Linear regression: trains and evaluates
README.md - Train/test datasets → Decision tree: trains and evaluates
README.md - Train/test datasets → Random forest: trains and evaluates
README.md - Train/test datasets → Gradient boosting: trains and evaluates
README.md - Train/test datasets → Hyperparameter tuning: supplies experiments
README.md - Train/test datasets → Model evaluation: supplies evaluation
README.md - Model evaluation → Model artifacts: exports champion
evaluation/model_comparison.py - Model artifacts → Prediction service: loads champion model
README.md - Fitted preprocessor → Prediction service: loads preprocessing state
README.md