← All projects

ML & Deep Learning

Ames Housing Price Prediction

Ames Housing sale-price prediction with five models: Linear Regression (OLS), Ridge, KNN, Decision Tree and Random Forest.

5 modelscompared with residual and actual-vs-predicted diagnostics

Stack: Python, statsmodels, scikit-learn, pandas

Live demo

A working version of this project will run right here.

Coming soon

Plan: In-browser price estimator using exported OLS/Ridge coefficients computed in JavaScript.

TODO: build and embed the demo

Key findings

  • p-value backward elimination and VIF were used to handle multicollinearity.
  • GridSearchCV tuned the hyperparameters.
  • Residual plots and actual-vs-predicted plots check each model's fit.

How it works

  • log1p/expm1 target transform for the skewed sale price.
  • StandardScaler is fit on training data only, so nothing leaks from the test set.
  • Includes a workaround for a pandas 2.x / statsmodels constant bug.
  • Companion Medium article: "The Line of Best Fit Is a Lie — It's Actually a Choice" (OLS vs MAE).

Code and write-ups