Project Insights

Key Findings & Learnings

Comprehensive analysis of results, strengths, limitations, and future directions

Key Findings

  • Year of registration is the strongest positive price driver
  • Mileage is the strongest negative price driver
  • Hybrid and Electric vehicles command premium prices
  • One-Hot Encoding outperforms Label Encoding by ~11% R²
  • Model achieves R² of 0.840, explaining 84% of price variance
  • RMSE of approximately £1,900 — typical prediction error
Analysis

Detailed Analysis

Top Positive Price Drivers

  • Year of Registration — Newer vehicles command significantly higher prices. Each additional year adds substantial value.
  • Engine Size — Larger displacement engines (e.g., Mustang 5.0L) are associated with premium vehicles.
  • Model Type — Mustang, Tourneo Custom, and Ranger far outprice budget models like Ka and Fiesta.
  • Hybrid/Electric — Premium fuel types command higher prices despite limited market penetration.
  • Automatic Transmission — Automatic and Semi-Auto cost more than Manual across all models.

Top Negative Price Drivers

  • Mileage — Each additional 10,000 miles reduces value by approximately £500. High-mileage vehicles depreciate significantly.
  • Fuel Efficiency (MPG) — Higher MPG often indicates budget-oriented models with smaller engines and lower base prices.
  • Vehicle Age — Depreciation is steepest in the first 3 years, then stabilizes for older vehicles.

Project Strengths

  • Achieves R-squared above 0.80 target on the test set
  • Stable and generalisable (5-fold CV std < 0.01)
  • Highly interpretable coefficients show feature impact
  • Fast training and inference (< 100ms / < 1ms)
  • Complete reproducible pipeline saved to disk
  • Comprehensive EDA with 22 visualizations
  • Rigorous validation with multiple techniques
  • Production-ready with joblib serialization

Limitations

  • Linear Regression assumes linear relationships — mileage vs price is partly non-linear
  • Performs less well at the extremes of the price range (very cheap/expensive)
  • Does not clean data quality issues (year = 2060, MPG > 150)
  • Label Encoding model significantly underperforms (encoding strategy matters)
  • Limited training data for Hybrid and Electric vehicles
  • No hyperparameter tuning performed
  • Single algorithm tested (no ensemble methods)

Future Improvements

While the current model performs well, there are several promising directions for future work:

Ridge or Lasso Regression
L1/L2 regularisation to reduce potential overfitting risk
Random Forest Regressor
Capture non-linear relationships for better accuracy
XGBoost / LightGBM
State-of-the-art boosting, likely +5–10% R² gain
Hyperparameter Tuning
GridSearchCV to optimise model configuration
Feature: Car Age
2025 - year is more intuitive than raw year
Feature: Mileage per Year
Captures intensity of vehicle use more precisely
SHAP Values
More rigorous feature attribution and explainability
Data Quality Cleaning
Remove outliers (year=2060, MPG>150) for cleaner training
Log-Transform Target
Reduce impact of right-skew, potentially improve RMSE
Separate Hybrid/Electric Model
Better pricing for premium fuel types with few examples
MLflow Experiment Tracking
Reproducible ML experiments at scale
FastAPI Prediction Endpoint
REST API for real-time inference
Streamlit Web Dashboard
Interactive demo for non-technical users
Docker Containerisation
Consistent deployment across environments
Cloud Deployment
AWS/Azure/GCP for production-ready scalable inference
CI/CD Pipeline
Automated testing and retraining on new data

Business Recommendations

For Dealerships

  • Use this model as a first-pass baseline for trade-in appraisals
  • Expect ±£1,900 variance — adjust for condition, service history, local demand
  • Focus acquisition on low-mileage, recent-year vehicles for best margins
  • Price Automatic transmissions with a premium over Manual
  • Be cautious with Hybrid/Electric pricing (limited training data)

For Private Sellers

  • Use predicted price as your starting point for negotiations
  • Emphasise low mileage and recent year in your listing
  • Consider that Automatic transmission adds value
  • Adjust expectations if your vehicle has high mileage or is older
  • Understand that model type is a major price driver

For Buyers

  • Use this tool to verify asking prices are reasonable
  • Negotiate harder on high-mileage vehicles
  • Expect to pay a premium for Automatic transmission
  • Ka and Fiesta offer best value in the budget segment
  • Research Hybrid/Electric listings carefully (model has limited data)

Lessons Learned

Technical Learnings

  • Encoding matters: One-Hot vs Label can swing R² by 11 percentage points
  • EDA is critical: 22 visualizations revealed insights that guided feature engineering
  • Validation is essential: Cross-validation proved the model generalises well
  • Interpretability matters: Linear Regression coefficients provide clear business insights
  • Data quality impacts results: Outliers (year=2060) should be cleaned in production

Soft Skills

  • Communication: Translating technical metrics into business value
  • Documentation: Comprehensive README and website for portfolio presentation
  • Project management: End-to-end pipeline from data to deployment
  • Stakeholder thinking: Considered needs of dealers, sellers, and buyers

Explore the Conclusion

Final summary, references, and contact information