This project aims to predict used car prices using machine learning models, surpassing the performance of the state-of-the-art benchmark. The Manheim Market Report (MMR) achieved a Normalized Root Mean Squared Deviation (NRMSD) of 3.30% on the test set, while our model achieved a competitive NRMSD of 3.48%.
Predicting used car prices accurately is a challenging problem due to variability in car attributes, market trends, and conditions. This project leverages advanced machine learning techniques and enriched features derived by tracking Vehicle Identification Numbers (VINs) to create a robust price prediction model.
The original dataset was sourced from Kaggle's Used Car Auction Prices dataset. Additional features were added by processing the VINs, making the dataset more comprehensive and improving the model's predictive capabilities.
-
Input Features:
vin: Vehicle Identification Numbermake: Car manufacturer (e.g., Toyota, Ford)model: Specific model (e.g., Camry, Mustang)body: Body type (e.g., sedan, SUV)transmission: Transmission type (e.g., automatic, manual)state: Registration stateexterior_color: Car's exterior colorinterior_color: Car's interior colorfuel_type: Type of fuel (e.g., gasoline, diesel, electric)year: Manufacturing yearcondition: Car condition (e.g., excellent, good)odometer: Mileage (in miles)engine_volume: Engine size (in liters)
-
Output:
- Predicted car price: The estimated market value of the car in USD.
data_processing/:data_preprocessing.py: Script for data cleaning, preprocessing, and feature engineering.
datasets/: Processed datasets used for training and evaluation.models/: Contains implementations of the following models:- Generalized Linear Model:
generalized_linear_model.py
- Linear Regression:
linear_regression.py
- XGBoost:
XGBoost.py
- Neural Networks:
- Small Model:
neural_network_numpy_small.py - Medium Model:
neural_network_pytorch_medium.py - Large Model:
neural_network_pytorch_large.py - Huge Model:
neural_network_pytorch_huge.py
- Small Model:
- Generalized Linear Model:
baseline.py: A baseline implementation for comparison.README.md: This file.
-
Clone the Repository:
git clone https://github.com/angel3481/CS-229-Final-Project.git cd CS-229-Final-Project -
Run Data Preprocessing: Process the raw dataset and add VIN-based features:
python data_processing/data_preprocessing.py
-
Train Models: Select and train any of the models from the
models/directory. For example:- Generalized Linear Model:
python models/generalized_linear_model.py
- Neural Network (Huge):
python models/neural_network_pytorch_huge.py
- Generalized Linear Model:
-
Predict Prices: Use a trained model to predict car prices. Example:
python models/neural_network_pytorch_huge.py --input <path_to_input_file> --output <path_to_output_file>
- Benchmark Performance:
- Manheim Market Report (MMR): 3.30% NRMSD
- Our Performance:
- Neural Network (Large): 3.51% NRMSD
- Neural Network (Huge): 3.48% NRMSD
These results demonstrate competitive performance, with the huge neural network achieving state-of-the-art results.
- Final Project Paper (PDF): Detailed report describing the methodology, experiments, and results of this project.
- Original Dataset:
- Sourced from Kaggle's Used Car Auction Prices dataset.
- Enhanced Dataset:
- Additional features were created by processing VINs, enabling more detailed predictions.
- Further optimize the huge neural network for improved performance.
- Integrate external market trend data for enhanced accuracy.
- Angel Raychev (GitHub)