Md Farhad Zaman

Full-Stack Software & AI Engineer

INITIALIZING AVIONICS & TELEMETRY...
NEXT.JS 16 SSR • THREE.JS WEBGL • WEBSOCKET CORE
← Back to Projects
MMU•2024 — Research & Coursework•ai

AutoTrader ML – Advanced Ensemble Valuation & Explainable AI Pipeline

Two-stage machine learning research and pricing pipeline developed at Manchester Metropolitan University (MMU MSc Data Science, Author: Md Farhad Zaman) analyzing 402,005 commercial vehicle listings from AutoTrader UK.

Executive Overview & Key Engineering Deliverables
  • Large-Scale Data Engineering: Ingested and cleansed 402,005 listings, engineering DVLA registration plate decoding heuristics from Wikipedia data to recover 33,311 missing vehicle manufacture years.
  • Automated Feature Selection: Consensus voting across Mutual Information, univariate SelectKBest, and Recursive Feature Elimination (RFE) to isolate the top 10 predictive features without data leakage.
  • Tuned Ensemble Stacking: Cross-validated Stacking Regressor combining Random Forest, Extra Trees, and XGBoost with a Linear Regression meta-learner, achieving test RMSE_log of 0.3021 (R² = 0.8446).
  • Explainable AI (SHAP & PDP): Game-theoretic TreeExplainer SHAP and Partial Dependence Plots revealing non-linear depreciation dynamics and brand equity valuation premiums.
PythonScikit-LearnXGBoostSHAP (Explainable AI)PandasNumPyTree Ensembles (Stacking)PCA & Manifold LearningPolynomial RegressionK-Means ClusteringMatplotlib / SeabornAutomated Feature Selection
Dataset Scale
402,005 Adverts
Best Model
Stacking (R² 0.838)
Explainability
SHAP + PDP / ICE
Institution
MMU (AMLC/MLC)
LIVE SYSTEM SIMULATION & INTERACTIVE PREVIEW
STATUS: ACTIVE WEBGL/SIM
AUTOTRADER ML // ENSEMBLE VALUATION & EXPLAINABLE AI STUDIO
MMU MLC & AMLC • XGBOOST / STACKING • SHAP & MANIFOLD LEARNING
AUTOTRADER ML // ENSEMBLE VALUATION & EXPLAINABLE AI STUDIO
402,005 ADVERTS (DVLA CLEANED)

VEHICLE CONFIGURATOR

INPUT REGRESSION FEATURES
VEHICLE AGE (sqrt_car_age):3.5 YEARS (1.87 √age)
0.5 Yrs (New)4.0 Yrs (Depreciation Knee)15.0 Yrs (Plateau)
ODOMETER MILEAGE (sqrt_mileage):38,000 MILES (195 √mi)
5,000 mi75,000 mi (UK Average)150,000 mi (High Usage)
PREDICTED VALUATION (f(x)):
£19,890(log: 9.8979)
BEST OVERALL
Stacking Regressor
R²: 0.8383 • RMSE: 0.3113
SELECT REGRESSION MODEL:CLICK TO BENCHMARK PREDICTIONS
SHAP WATERFALL FORCE VECTORSBASE VALUE E[f(x)] = £12,450
Vehicle Age (sqrt_car_age)-£3,852
Make Segment (make_segment)+£3,450
Mileage (sqrt_mileage)-£2,099
Fuel & Body (fuel_body_combo)+£1,250
PARTIAL DEPENDENCE: sqrt_car_age vs log_priceActive Car: 3.5 yrs
Year 0 (New: £26.3k)Year 4 (£14.8k - Steep 20%/yr Drop)Year 15 (£4.2k - Value Floor)
FULL-STACK SYSTEM ARCHITECTURE SPECIFICATION
CLIENT & UI TIER
  • Interactive Jupyter Lab research workbench structuring exploratory data analysis, residual diagnostics, and reproducible ML workflows.
  • Diagnostic visualization suite engineered with Matplotlib and Seaborn for residual error distributions, actual-vs-predicted scatters, and learning curves.
  • SHAP summary beeswarm and waterfall force plots providing global feature attributions and single-prediction explainability vectors.
  • 1D and 2D Partial Dependence Plot (PDP) visualizers rendering non-linear age-mileage interaction surfaces and Individual Conditional Expectation (ICE) paths.
API & REAL-TIME ENGINE
  • Scikit-Learn ColumnTransformer and Pipeline architecture strictly isolating numeric median imputation and StandardScaler from categorical OneHotEncoder to guarantee zero data leakage.
  • Automated Feature Selection (AFS) engine fusing Mutual Information (mutual_info_regression), univariate SelectKBest (f_regression), and Recursive Feature Elimination (RFE) with Random Forest consensus voting across 38 features.
  • Hyperparameter optimization pipeline leveraging RandomizedSearchCV with RMSE scoring across tree depths, estimators, learning rates, subsampling, and leaf regularizers.
  • Extreme Gradient Boosting (XGBoost) engine tuned to n_estimators=300, max_depth=6, lr=0.05, subsample=1.0, and colsample=0.7 minimizing bias while preventing variance overfitting.
  • Multi-paradigm ensemble architecture (VotingRegressor & StackingRegressor) utilizing out-of-fold cross-validated predictions with a LinearRegression meta-learner.
  • Higher-order polynomial regression pipeline comparing degrees 1 to 5, and unsupervised K-Means cluster augmentation (k=2) evaluating latent manifold signals.
DATA & INFRASTRUCTURE
  • Raw commercial dataset ingest processing 402,005 vehicle listings and 12 raw columns from AutoTrader UK.
  • Cleaned and transformed tabular dataset (401,627 records) with DVLA Wikipedia registration year recovery and log-transformed target variables.
  • Joblib-serialized model artifact repository storing trained preprocessors, tuned tree estimators, and stacking ensemble meta-models.
  • Python 3.10+ analytical runtime with vectorized NumPy and Pandas memory data structures.
  • Multi-threaded CPU parallel processing (n_jobs=-1) accelerating cross-validation folds and tree ensemble training.
  • DVLA algorithmic registration code standardizer resolving prefix, suffix, and modern UK plate formats.
ROLE-BASED WORKFLOW SPECIFICATION (RBAC)
Lead Machine Learning Researcher & Pipeline ArchitectRESEARCH & MODEL ARCHITECTURE
  • ▸Architect the complete end-to-end data preparation, feature engineering, and model training pipelines across 402,005 listings.
  • ▸Formulate automated feature selection frameworks combining Mutual Information, SelectKBest, and Recursive Feature Elimination.
  • ▸Tune hyperparameters for Random Forest, Extra Trees, and XGBoost using RandomizedSearchCV to minimize validation log-RMSE.
  • ▸Engineer and validate second-level Stacking Regressor meta-models with out-of-fold cross-validation, achieving benchmark R² of 0.8383.
Automotive Valuation Analyst & Domain SpecialistVALUATION & MARKET ECONOMICS
  • ▸Audit used-car market dynamics: model non-linear 20% annual exponential vehicle depreciation and market segment behavior.
  • ▸Develop DVLA registration plate heuristics to reconstruct missing vehicle manufacture years from UK registration suffixes and prefixes.
  • ▸Analyze residual errors and evaluate why linear baselines severely underpredict luxury and premium vehicles (max error -£82,675).
  • ▸Perform K-Means market segmentation (k=2, Silhouette 0.442) separating economy workhorses from low-mileage premium executive cars.
AI Ethics & Model Governance AuditorEXPLAINABILITY & REGULATORY COMPLIANCE
  • ▸Implement game-theoretic Shapley values (SHAP TreeExplainer) to guarantee transparent, explainable valuation decisions.
  • ▸Inspect Partial Dependence Plots (PDP) and ICE curves to verify monotonicity of age and mileage depreciation trends.
  • ▸Validate model generalizability by monitoring train-test overfitting gaps (XGBoost gap: 0.0208) across out-of-sample data splits.
  • ▸Document complete algorithmic methodology conforming to academic peer-review standards at Manchester Metropolitan University.

Key Technical Achievements

  • 01Large-Scale Data Engineering & DVLA Heuristics: Cleaned 402,005 AutoTrader listings, recovered 33,311 missing years of registration via Wikipedia-derived DVLA plate heuristics, and normalized skewness (154.68 to 1.1374).
  • 02Automated Consensus Feature Selection: Engineered 38 one-hot features and ran consensus voting across Mutual Information, SelectKBest, and Random Forest RFE to isolate the most predictive market factors.
  • 03High-Performance Tree Ensembles: Tuned RandomForest, ExtraTrees, and XGBoost (lowest tree RMSE_log of 0.3131, R² = 0.8364), outperforming baseline linear regression models.
  • 04Out-of-Fold Stacking Meta-Learner: Built a StackingRegressor combining diverse bagging and boosting models with a Linear Regression meta-learner, achieving the global benchmark (Validation RMSE_log 0.3113, Test R² 0.8446).
  • 05Game-Theoretic SHAP & PDP Explainability: Deployed TreeExplainer SHAP and 1D/2D Partial Dependence Plots with ICE curves, isolating sqrt_car_age as the dominant driver (SHAP 0.3360) followed by premium brand equity.
  • 06Manifold Learning & Cluster Analysis: Proved 2 PCA components explain 98.5% of numeric variance, explored non-linear Isomap manifolds, and demonstrated with K-Means (k=2) why gradient boosting natively captures cluster boundaries.

Measurable Impact & Production Verification

Engineered a master-level machine learning and data science valuation suite for AutoTrader UK (MMU MSc Data Science, Author: Md Farhad Zaman). Successfully demonstrated that tuned gradient boosting (XGBoost) and out-of-fold Stacking Regressors (R² 0.8383) dramatically outperform linear baselines by capturing non-linear depreciation curves and brand equity interactions, verified through comprehensive SHAP explainability and manifold learning.

Key Production Deliverables & Verification

Ensemble Valuation Pipeline
Validated Stacking Regressor achieving test R² = 0.8446 and test log-RMSE = 0.3021 across 401,627 cleaned AutoTrader listings.
Automated Feature Selection Matrix
Consensus multi-method selection reducing 38 one-hot features to core predictive subsets with minimal generalisation gap (0.0208).
SHAP & PDP Interpretability Suite
Global and local feature attributions isolating brand equity premiums and exponential vehicle age depreciation.
Manifold & Cluster Analytics
2D PCA projection retaining 98.5% cumulative variance, paired with k=2 K-Means clustering (Silhouette Score 0.442).
← Back to All Projects