Downloads · 30 days
0
omerlu/vehicle-price-predictor
vehicle-price-predictor is a machine learning model from omerlu. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Vehicle Price Prediction and Market Analysis
Downloads · 30 days
0
Access
Public
Updated Dec 9, 2025
Repo size
18.8 MB
Likes
0
Public
Click a slice to open those files.
.pkl17.2 MB · 58%
From the Hugging Face model README
Vehicle Price Prediction and Market Analysis
This project analyzes the Australian Vehicle Prices dataset (from Kaggle) and builds multiple models to:
Understand the key factors influencing car prices
Predict vehicle prices using regression models
Segment vehicles into meaningful clusters
Classify vehicles into Standard vs Premium categories
The project includes extensive EDA, feature engineering, regression modeling, clustering, and classification.
The dataset includes 16,774 vehicle listings from the Australian market, containing attributes such as:
Brand, Model
Year
Kilometres driven
Engine size
Fuel consumption
Transmission
Drive type
Doors, Seats
Body type
Color
Price (target variable)
Research Question: What are the key factors that influence vehicle prices in the Australian market, and how accurately can we predict a car’s price?
Removed listings with missing Price
Filled missing categorical values with "Unknown"
Converted text fields such as "4 doors" → numeric values
Converted "5 seats" → numeric values
Created new features:
Car_Age = 2024 – Year
Kilometres_Clean (outlier-adjusted)
Efficiency = Engine_Liters / FuelConsumption
Is_Luxury based on known luxury brands (e.g., BMW, Mercedes, Porsche)
Below are the included graphs as Markdown placeholders.
3.1 Price Distribution

3.2 Kilometres Distribution

3.3 Engine Size Distribution

3.4 Fuel Consumption Distribution

3.5 Price vs Kilometres

3.6 Price vs Year

3.7 Price Distribution by Brand

3.8 Price by Drive Type

3.9 Price by Doors

3.10 Price by Seats

3.11 Price by Body Type

3.12 Price by Transmission Type

3.13 Correlation Heatmap

Key Insights from EDA:
Newer vehicles and low-kilometre vehicles are significantly more expensive.
Engine size and number of cylinders strongly correlate with price.
Luxury brands (Porsche, Lamborghini, Ferrari, McLaren) show extreme right-skewed distributions.
SUVs, Coupes, and Premium categories have much higher median prices.
Fuel efficiency has a mild negative correlation with price (larger engines consume more fuel and tend to be pricier).
Three models were trained:
Models:
Linear Regression
Random Forest Regressor
XGBoost Regressor
4.1 Actual vs Predicted Prices

4.2 Residuals Plot

4.3 Feature Importance (Linear Regression)

Key Regression Findings:
Linear Regression underfits high-priced vehicles due to non-linearity.
Random Forest and XGBoost perform significantly better with nonlinear interactions.
Cylinders, Engine Size, Year, and Kilometres are the top predictors of price.

Cluster Interpretation: Cluster Characteristics 0 Older, lower engine size, lower price 1 Mid-range vehicles, balanced features 2 Newer, powerful engines, premium pricing 6. Advanced Modeling: Random Forest & XGBoost 6.1 Performance Comparison

R² Scores:
Random Forest: ~0.89
XGBoost: ~0.83
Linear Regression: ~0.67
6.2 Feature Importance (Random Forest)

Important Features:
Car Age
Kilometres
Cylinders
Engine Liters
Efficiency
Luxury Brand Indicator
Drive Type (AWD / FWD)
Created binary label:
0 = Standard vehicle
1 = Premium vehicle
7.1 Class Distribution

7.2 Confusion Matrices
Decision Tree:

KNN:

Random Forest Classifier:

Classification Findings:
Random Forest achieved the highest accuracy and best balance across classes.
Premium vehicles are harder to classify due to smaller sample size (class imbalance).
Important features for classification included: Cylinders, Engine Size, Luxury Brand Indicator, Drive Type, Cluster ID.
Price is most strongly driven by engine size, cylinders, year, kilometres, and luxury brand.
SUVs and Coupes show consistently higher price ranges.
Luxury brands dominate the top of the market with extreme price outliers.
Modeling Insights:
Simple linear models cannot capture the nonlinear structure of car prices.
Random Forest provides the best regression performance (R² ≈ 0.89).
Clustering reveals meaningful market segments.
Classification models perform well but are limited by class imbalance.
video: https://www.loom.com/share/f157870be4a6463a8bb10624ff12f218