Project Guide Compliance

Vehicle Price Estimation Documentation

Comprehensive documentation of Problem Statement, EDA, Preprocessing, ML Architectures, and Evaluation

All 5 Phases Complete

1. Project Overview & Problem Statement

Estimating a reasonable resale price for a pre-owned vehicle in the Indian automotive secondary market is inherently complex. Resale prices are governed by multi-dimensional interactions between manufacturer brand equity, vehicle model category, manufacturing year (depreciation rate), cumulative odometer usage (wear and tear), and powertrain fuel type (Petrol vs. Diesel vs. LPG/CNG). Buyers risk overpaying for depreciated vehicles, while sellers risk undervaluing their assets without data-driven guidance.

Project Mission Statement

To construct a machine learning system that ingests historical listing data, applies feature engineering and data cleansing, benchmarks multiple regression algorithms, and serves instantaneous price valuations in Indian Rupees (₹) alongside business intelligence market trends.

Core Project Objectives & Fulfillment
# Project Guide Objective Implementation in System
Obj 1 Understand structure and characteristics of used-car listing data. Fulfilled Raw Quikr Indian car listing schema inspected (892 initial records).
Obj 2 Identify and handle missing, inconsistent, duplicate and invalid records. Fulfilled Filtered non-numeric years, non-numeric prices, scrubbed "kms", removed 96 duplicates.
Obj 3 Perform exploratory data analysis to understand vehicle pricing patterns. Fulfilled Computed brand distributions, age decay curves, odometer brackets.
Obj 4 Identify factors associated with differences in used-car prices. Fulfilled Assessed brand equity premiums, age depreciation impact, and fuel retention.
Obj 5 Apply feature engineering and preprocessing techniques. Fulfilled Engineered vehicle_age, kms_per_year, 3-word model standardization, OneHotEncoding.
Obj 6 Develop and compare multiple machine learning regression models. Fulfilled Trained & evaluated 3 core models: Linear Regression, Decision Tree, and Random Forest (Winner).
Obj 7 Evaluate model performance using appropriate regression metrics. Fulfilled Computed R², MAE (₹), RMSE (₹), and 5-Fold cross-validation across all models.
Obj 8 Build a system that accepts vehicle details and estimates its resale price. Fulfilled Responsive web application with dynamic cascading brand/model selects.
Obj 9 Develop visualisations to explore vehicle pricing & diagnostic patterns. Fulfilled High-resolution model comparison, residual, and depreciation diagnostic plots.
Obj 10 Present findings through a dashboard or web application. Fulfilled AutoValuate AI web application with 5 dedicated portals.

2. Exploratory Data Analysis & Data Cleansing

Raw Dataset Anomalies Identified:
  • Year Column Inconsistencies: Scraped titles contained non-year strings (e.g. "Zest", "sale", "car", "TOUR", "150k") shifted due to comma-delimited misalignments. Cleaned via str.isnumeric().
  • Price Formatting & Unpriced Listings: 35 entries had "Ask For Price" instead of a transaction amount, and valid prices contained thousands commas (e.g. "4,25,000"). Removed "Ask For Price" and stripped commas.
  • Kilometres Driven Text Suffixes: Raw values contained string suffixes like "45,000 kms" and in some corrupted rows contained "Petrol". Extracted numerical tokens, sanitized commas, and coerced to integer.
  • Missing Fuel Types: 55 entries lacked powertrain fuel information. Dropped records with null fuel types to preserve high model fidelity.
  • Extreme Price Outlier: A Mahindra XUV500 W6 was listed at ₹85,00,003 (85 Lakhs), which is an anomalous data-entry artifact for a car in the 8-15 Lakh segment. Filtered out listings exceeding ₹60 Lakhs.
  • High-Cardinality Model Names: Raw titles had up to 10 words (e.g. "Hyundai Santro Xing XO eRLX Euro III"). Standardized to the first 3 tokens (e.g. "Hyundai Santro Xing") to avoid categorical sparsity while preserving model uniqueness.
  • Duplicates: 96 redundant duplicate listings were detected and purged.
Raw Listing Records

892

Corrupted / Outliers Purged

173

Cleaned Training Listings

719

3. Feature Engineering & Model Architecture

To capture depreciation dynamics and non-linear patterns, the following feature transformations and encoding mechanisms were designed:

Feature Engineering
  • vehicle_age = 2024 - year (Direct measure of chronological depreciation).
  • kms_per_year = kms_driven / max(vehicle_age, 1) (Identifies intense commercial vs. light personal usage).
  • usage_category (Low Usage < 35k km, Moderate 35k-75k km, High > 75k km).
  • Standardized 3-token model naming.
Preprocessing Pipeline
  • ColumnTransformer with OneHotEncoder(handle_unknown='ignore', sparse_output=False) for categorical variables (name, company, fuel_type).
  • Numerical passthrough for continuous features (year, kms_driven).
  • Guarantees zero inference downtime even when encountering unseen combinations in production.
Evaluated Algorithms Rationale
Algorithm Mathematical Basis Key Hyperparameters Strengths for Used Car Valuation
Linear Regression Ordinary Least Squares (OLS) linear fit Default OLS parameters Fast linear baseline, but assumes car age and price decrease purely linearly.
Decision Tree Recursive binary variance reduction max_depth=12, min_samples_split=5 Captures non-linear price cliffs, though a single tree can overfit noisy splits.
Random Forest (Winner 🏆) Bagging ensemble of 100 bootstrapped trees n_estimators=100, max_features=0.5 Handles non-linear age/mileage patterns across multiple trees and averages them for highest R² and lowest MAE/RMSE.

4. Evaluation Metrics & Diagnostic Analysis

R² (Coefficient of Determination)

Measures the proportion of variance in vehicle resale prices predictable from the model inputs. Higher is better (range 0 to 1).

MAE (Mean Absolute Error)

Average absolute difference between actual listed prices and predicted valuations in Indian Rupees (₹).

RMSE (Root Mean Squared Error)

Penalizes large outlier deviations heavily, serving as a sensitivity metric for high-value luxury errors.

Key Diagnostic Findings:
  • Residual Symmetry: The residual distribution plot confirms that prediction errors are clustered tightly around ₹0, demonstrating homoscedasticity across mainstream budget vehicles (₹1.5L to ₹6.0L).
  • Cross-Validation Consistency: 5-Fold cross validation demonstrated consistent out-of-sample performance across folds without severe data leakage.
  • Luxury Asymmetry: Prediction variance is slightly higher on premium luxury models (Audi, BMW, Jaguar) due to lower sample density in the historical listing archive.