← Back to projects View source code

House Price Prediction with Regression Benchmarking

Predicting house prices with neural network regression, model benchmarking, dollar-based error diagnostics, and feature-driver interpretation.

This project builds a TensorFlow/Keras regression workflow for house price prediction, compares it against traditional machine learning baselines, and explains model behavior through residual diagnostics and permutation importance.

Neural Network • Regression Benchmarking • Error Diagnostics • Feature Importance

1,000 Housing records analyzed
$11.6K Neural network MAE
0.961 Neural network R² score
≈2.1% Average-price error share

Project Overview

This project predicts house prices from structured housing features using a neural network regression model, then evaluates performance in real dollar terms. The workflow combines data validation, exploratory analysis, standardized preprocessing, TensorFlow/Keras modeling, baseline benchmarking, residual diagnostics, and feature-driver interpretation.

Neural Network Regression Built a TensorFlow/Keras model to predict continuous house prices from structured property features.
Real-Dollar Evaluation Converted scaled model outputs back into dollar values using MAE, RMSE, and R².
Model Benchmarking Compared the neural network against linear, ridge, random forest, and gradient boosting baselines.
Feature Drivers Used correlation, standardized effects, and permutation importance to identify the strongest price signals.

Data Story

The dataset contains 1,000 complete housing records with three predictive features: property size, location score, and number of bedrooms. Before modeling, the notebook validates data quality, checks for missing values and duplicates, and explores how each feature contributes to price variation. The strongest signal comes from property size, while location score and bedrooms add secondary predictive value that helps explain differences between otherwise similar homes.

House price data story dashboard showing price distribution, feature relationships, and correlations
Data story. Data story. Property size is the dominant price signal, with a correlation of 0.87. Location score and bedroom count add secondary signal, helping explain price differences across similar-sized homes.

Neural Network Workflow

The neural network trains on standardized housing features and scaled target values, then converts predictions back to dollar prices for evaluation. Early stopping prevents unnecessary training once validation performance stabilizes, keeping the model compact and controlled.

01

Prepare Features

Split the data into training and test sets, then scaled features and target values using training-only transformations to avoid data leakage.

02

Train Neural Network

Trained a compact TensorFlow/Keras regression network with two ReLU hidden layers, Adam optimization, and early stopping.

03

Evaluate in Dollars

Converted predictions back to the original price scale and reported MAE, RMSE, R², residuals, and price-band errors.

Neural network training and validation loss curves for house price prediction
Training curves. Loss dropped sharply within the first few epochs, and early stopping ended training after validation performance stabilized. This supports a compact neural-network workflow without unnecessary overtraining.

Regression Model Benchmark

The neural network was benchmarked against simpler linear, regularized, and tree-based models using the same 80/20 split. The neural network produced the lowest MAE, but its advantage over Linear Regression was modest, about $233 in average error. This comparison keeps the project honest and shows that model selection should balance accuracy, interpretability, and complexity.

Model MAE Portfolio takeaway
Neural Network $11,565.78 Lowest MAE overall, improving on Linear Regression by about $233 in average error.
Linear Regression $11,798.37 Nearly matched the neural network, showing that the dataset has a strong linear structure.
Ridge Regression $11,807.38 Regularized linear model performed similarly to ordinary linear regression.
Gradient Boosting $12,667.65 Strong tree-based benchmark, but weaker than neural and linear models here.
Random Forest $13,618.12 Useful nonlinear baseline, but produced the highest MAE among the compared models.
House price model benchmark comparing MAE across regression models
Model benchmark. The neural network achieved the lowest MAE at $11.6K, but Linear Regression was within about $233, showing that simpler models remained highly competitive.

Prediction Diagnostics

The strongest part of the project is the diagnostic analysis. Instead of reporting only one metric, the notebook examines actual-vs-predicted prices, residual distribution, error patterns, and model behavior across price bands.

House price prediction diagnostics showing actual versus predicted prices, residuals, and error by price band
Prediction diagnostics. The model achieved strong alignment between predicted and actual prices, with residual analysis used to inspect error behavior.

Interpretation

The neural network achieved an MAE of about $11.6K and an R² of 0.961 after predictions were converted back into real dollar values. Benchmarking showed that the neural network performed best, while linear models remained highly competitive, making the project a practical study in accuracy, interpretability, and model complexity trade-offs. Residual diagnostics further helped identify where prediction errors were concentrated across the price range.

Feature Drivers

The feature analysis confirms that property size is the strongest driver of predicted price, while location score and bedrooms provide additional signal. The project compares standardized linear effects with permutation importance to show both simple feature relationships and each feature’s contribution to model performance.

House price feature driver analysis showing correlations and permutation importance
Feature drivers. Shuffling property size increased MAE by about $61K, far more than location score or bedrooms, confirming size as the dominant predictive signal.

Role and Implementation

I implemented the full regression modeling workflow, from data validation and exploratory analysis to neural network training, benchmark comparison, residual diagnostics, and feature-driver interpretation. The goal was to evaluate not only whether the model predicted well, but whether its errors and feature behavior could be explained clearly.

Regression Modeling

Built and evaluated a TensorFlow/Keras neural-network regression model for predicting continuous house prices from structured property features.

Model Benchmarking

Compared neural network performance against Linear Regression, Ridge Regression, Random Forest, and Gradient Boosting using the same train/test split.

Error Diagnostics

Evaluated model behavior using MAE, RMSE, R², actual-vs-predicted plots, residual analysis, and price-band error patterns.

Tools

Python • Pandas • NumPy • Matplotlib • Scikit-learn • TensorFlow/Keras • Jupyter Notebook

Artifacts

The project artifacts include the notebook, source repository, visual diagnostics, benchmark results, and feature-driver analysis.

GitHub Repository

Source repository containing the notebook, code, visuals, and project documentation.

Open repository →

Notebook

Main Jupyter Notebook covering data validation, neural network regression, benchmarking, diagnostics, and feature interpretation.

house_price_prediction_nn.ipynb

Visual Outputs

Selected visuals for data story, model benchmark, neural network training, prediction diagnostics, and feature drivers.

images/projects/house-price/