Skip to content

Repository files navigation

House Prices: Advanced Regression Techniques

This project predicts home sale prices for Kaggle's House Prices: Advanced Regression Techniques competition.

Result

The final submission achieved a 0.12053 RMSLE score on the Kaggle leaderboard.

The model blends four regressors:

  • XGBoost (20%)
  • Lasso regression (30%)
  • Gradient Boosting regression (30%)
  • CatBoost (20%)

It also creates useful housing features, including total square footage, bathrooms, porch area, house age, remodel age, amenity flags, and quality scores.

Files

File Purpose
train_model.py Trains the models and creates predictions.
train.csv Training data with the SalePrice target.
test.csv Test data used for predictions.
submission.csv Generated Kaggle submission file.
data_description.txt Description of the dataset columns.

Setup

Create a virtual environment and install the required packages:

python3 -m venv .venv
source .venv/bin/activate
pip install numpy pandas scikit-learn xgboost catboost

On macOS, XGBoost may require OpenMP:

brew install libomp

Train and generate predictions

From the project folder, run:

python train_model.py

The script runs five-fold cross-validation, trains the ensemble on all training data, and saves predictions to submission.csv.

The submission file has two columns:

Id,SalePrice
1461,118746.34550306523

Upload submission.csv to Kaggle to receive a leaderboard score.

Notes

  • The model predicts log1p(SalePrice), which matches the competition's RMSLE evaluation.
  • Missing numeric values are filled with the median and missing categorical values with the most common value.
  • Categorical values are one-hot encoded for most models; CatBoost handles categories directly.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages