Assignment 2 โ Austin Housing Price Prediction
Project Overview
This project uses the Austin Housing dataset to predict real-estate prices using both regression and classification models.
The first part of the project focuses on predicting the continuous housing price variable: latestPrice.
The second part reframes the problem as a classification task by dividing prices into three tiers:
- Affordable
- Mid-Range
- Luxury
Presentation Video
Dataset
The dataset used in this project is:
austinHousingData.csv
The notebook expects the dataset file to be located in the same directory as the notebook.
Dataset shape:
- 15,171 rows
- 47 columns
Main Notebook
The main notebook file is:
Assignment_2_Final_Version.ipynb
Files Included
This repository includes:
Assignment_2_Final_Version.ipynbaustinHousingData.csvregression_model.pklclassification_model.pklREADME.md
Regression Task
The regression models compared in this project include:
- Baseline Linear Regression
- Improved Ridge Regression
- Random Forest Regressor
- Gradient Boosting Regressor
Regression Results
| Model | Rยฒ | MAE |
|---|---|---|
| Baseline Linear Regression | 0.2347 | $163,697.27 |
| Ridge Regression | 0.3536 | $135,169.93 |
| Random Forest Regressor | 0.2446 | $118,981.47 |
| Gradient Boosting Regressor | 0.2602 | $117,041.55 |
The preferred operational regression model is Gradient Boosting Regressor.
It was selected because it achieved the lowest Mean Absolute Error (MAE), making it the most useful model for practical dollar-level price prediction.
Classification Task
The classification models compared in this project include:
- Logistic Regression
- Random Forest Classifier
- Gradient Boosting Classifier
Classification Results
| Model | Macro F1-Score | Macro ROC-AUC |
|---|---|---|
| Logistic Regression | 0.72 | 0.8771 |
| Random Forest Classifier | 0.79 | 0.9275 |
| Gradient Boosting Classifier | 0.80 | 0.9362 |
The preferred classification model is Gradient Boosting Classifier.
It was selected because it achieved the strongest Macro F1-Score and Macro ROC-AUC.
Model Files
Two model files are included:
regression_model.pkl
Contains the final regression model bundle.
classification_model.pkl
Contains the final classification model bundle.
Important note:
The saved pickle models expect the preprocessed feature matrices generated by the notebook, not raw housing data directly.
How to Run
To reproduce the project:
- Open
Assignment_2_Final_Version.ipynb. - Make sure
austinHousingData.csvis in the same folder. - Run all cells from top to bottom.
- The notebook will train the models and export the pickle files.
Author
Bar Wachsman