All work
Self-initiated technical buildApplied Machine Learning

AI House Price Estimator

A tuned Random Forest regression model deployed via a FastAPI backend and React frontend.

applied machine learning / AI House Price Estimator

Spatial feature space.
Sub-10ms cloud prediction.

one inference pipeline four rigorous mathematical boundaries

Follow a California housing record through the inference pipeline. An 8-dimensional census block is normalized, processed through 200 bootstrapped decision trees, cross-validated via GridSearchCV, and served in under 10ms via asynchronous FastAPI.

pipeline telemetry

Continuous Regression Architecture

Scikit-Learn 1.4 • Joblib Serialization • 5-Fold Cross Validation

  1. SPATIAL INGESTION

    raw census signalsnormalized 8D vectors

  2. TREE BAGGING

    bootstrapped subsets200-tree ensemble vote

  3. HYPERPARAMETER SURFACE

    36 candidate configurationsR² 0.8062 convergence

  4. PRODUCTION SERVING

    HTTP POST requestinstantaneous valuation

01

01 // SPATIAL INGESTION

8-Dimensional feature space normalized via StandardScaler.

Raw census block records are transformed into continuous z-scores across median income, room ratios, household densities, and high-precision GPS coordinates.

raw census signalsnormalized 8D vectors
  • standard scaler pipeline
  • zero-variance outlier filtering
MedInc: 3.870Rooms: 5.43Lat: 35.63°NLng: -119.57°W
AI House Price Estimator — 8-Dimensional feature space normalized via StandardScaler.
StandardScaler Z-Score Transformation
02

02 // TREE BAGGING

200 bagged decision trees minimizing variance across clusters.

Bootstrapped decision trees vote on non-linear price splits, dampening outlier leverage in multi-modal California real estate sub-markets.

bootstrapped subsets200-tree ensemble vote
  • bootstrap aggregation
  • decorrelated feature subspace
MedInc: 5.210Rooms: 6.12Lat: 37.88°NLng: -122.23°W
AI House Price Estimator — 200 bagged decision trees minimizing variance across clusters.
Bootstrapped Variance Reduction
03

03 // GRIDSEARCHCV OPTIMIZATION

5-fold cross-validation reaching an R² of 0.8062 and MAE of 0.3261.

Exhaustive grid search isolates optimal tree depth and split criteria across 5 held-out folds, preventing localized data leakage.

36 candidate configurationsR² 0.8062 convergence
  • 5-fold cross validation
  • leak-free fold isolation
MedInc: 8.325Rooms: 6.98Lat: 37.85°NLng: -122.25°W
AI House Price Estimator — 5-fold cross-validation reaching an R² of 0.8062 and MAE of 0.3261.
R² 0.8062 & MAE 0.3261 Convergence
04

04 // FASTAPI SERVING

Sub-10ms cloud prediction serving with serialized Joblib weights.

Serialized model weights are hosted on an asynchronous FastAPI worker with Pydantic validation and interactive Swagger documentation.

HTTP POST requestinstantaneous valuation
  • sub-10ms async inference
  • Pydantic schema validation
MedInc: 4.650Rooms: 5.80Lat: 34.22°NLng: -118.45°W
AI House Price Estimator — Sub-10ms cloud prediction serving with serialized Joblib weights.
Sub-10ms Inference Latency
Interactive Evaluation Workbench

Feature Synthesizer & Real-Time Price Estimator

FASTAPI /api/predict • 6.8ms
California Micro-Market Enclaves:
Median Household Income:$83.2k/yr (8.32)
Low Income (1.5)State Median (5.2)High Income (15.0)
HouseAge41 yrs
AveRooms6.98
Latitude37.88°N
Longitude-122.23°W
ESTIMATED DISTRICT VALUATIONR² 0.8062 ACCURACY
$692,800
Confidence Envelope:±$32,610 (MAE 0.3261)
AI House Price Estimator • Applied ML Architecture & Benchmarks
Applied Machine Learning Application

Predicting housing values.
Evaluated ensemble regression with R² 0.8062.

Random Forest + FastAPI + React, tuned with GridSearchCV and deployed on Render and Vercel.

Accuracy Metric
R² 0.8062

Cross-validated coefficient of determination across held-out splits

Error Margin
MAE 0.3261

Mean absolute error on test split (~$32.6k deviation envelope)

Inference Speed
< 10ms

Asynchronous FastAPI REST endpoint execution latency

Random Forest Feature Importance Analysis

Gini Impurity Reduction • 8-Dimensional Input
MedIncMedian Household Income
52.3%

Primary economic predictor of district property values

Lat & LngGeospatial Coordinates
18.7%

Proximity to coastal economic hubs (SF Bay Area, Silicon Valley, LA basin)

AveOccupAverage Household Occupancy
14.1%

Density ratio measuring household crowding versus luxury single-family ratios

AveRooms / BedrmsRoom & Bedroom Ratios
8.1%

Physical spatial layout and structural capacity index

HouseAgeMedian Housing Age
6.8%

Construction era reflecting historical preservation and municipal infrastructure

Model Benchmark & Evaluation Matrix

Evaluated on Held-Out Test Split (20%)
Baseline Linear

Linear Regression

R² Score:0.6062
MAE:0.5280
Latency:2ms
L2 Regularized

Ridge Regression (L2)

R² Score:0.6063
MAE:0.5274
Latency:2ms
Unpruned Tree

Decision Tree Regressor

R² Score:0.6210
MAE:0.4412
Latency:4ms
200 Bagged Trees + GridSearchCVWinner

Tuned Random Forest (Ours)

R² Score:0.8062
MAE:0.3261
Latency:8ms

5-Fold Cross-Validation & Hyperparameter Grid

Scikit-Learn GridSearchCV • K-Fold cv=5
Held-Out Split Generalization (K-Fold cv=5)
Fold 01
Train R²: 0.8312Val R²: 0.8045MAE 0.3280
Fold 02
Train R²: 0.8295Val R²: 0.8089MAE 0.3241
Fold 03
Train R²: 0.8320Val R²: 0.8031MAE 0.3298
Fold 04
Train R²: 0.8308Val R²: 0.8074MAE 0.3255
Fold 05
Train R²: 0.8317Val R²: 0.8068MAE 0.3272
Mean Cross-Validation Score:R² = 0.8062 (±0.0021)
GridSearchCV Parameter Optimization Space
n_estimatorsSelected: 200
Evaluated: [50, 100, 200]

Minimizes tree correlation & ensemble variance

max_depthSelected: None (Full)
Evaluated: [15, 25, 35, None]

Captures non-linear geospatial interactions

min_samples_splitSelected: 5
Evaluated: [2, 5, 10]

Eliminates leaf-level memorization of localized noise

max_featuresSelected: 1.0 (All 8)
Evaluated: ['sqrt', 'log2', 1.0]

Preserves coordinate coupling (latitude + longitude)

Total Candidate Fits:180 Fits (36 Candidates × 5 Folds)
Visual Artifacts & Telemetry

Interface & Data Pipeline Showcase

Real-Time Inference Interface
React 19 Frontend
Sub-10ms UX Response
Artifact 01 of 04

Real-Time Inference Interface

React Web Dashboard & Form Controls

Interactive parameter inputs with client-side validation, toast notifications, and Axios HTTP client communicating directly with the FastAPI cloud backend.

Component:React 19 Frontend
Performance:Sub-10ms UX Response
Model Showcase Artifacts
Code & Boundary Inspector

Applied Machine Learning Mechanics

01 of 04

Feature Space

Comprehensive geographical and demographic feature normalization.

Inputs incorporate 8 numerical dimensions from the California housing dataset including median income, housing age, average rooms, population density, and GPS coordinates.

Features8 Numerical Dimensions
DatasetCalifornia Housing
NormalizationStandardScaler pipeline
PandasNumPyFeature Scaling
estimator/ml/preprocessing.py
import pandas as pd
import numpy as np

def prepare_features(df):
    features = ['MedInc', 'HouseAge', 'AveRooms', 'AveBedrms', 'Population', 'AveOccup', 'Latitude', 'Longitude']
    return df[features]
Scikit-Learn / FastAPIOptimized Weights
02 of 04

Random Forest Ensemble

Robust regression through bagged decision tree ensembles.

The model builds 200 regression trees across bootstrapped samples, averaging splits to minimize variance and prevent overfitting on outlier districts.

Estimators200 Decision Trees
TaskContinuous Regression
CriterionSquared Error
Scikit-LearnRandom ForestEnsemble Regressor
estimator/ml/random_forest_model.py
from sklearn.ensemble import RandomForestRegressor

model = RandomForestRegressor(
    n_estimators=200,
    max_depth=None,
    min_samples_split=5,
    random_state=42,
    n_jobs=-1
)
Scikit-Learn / FastAPIOptimized Weights
03 of 04

Hyperparameter Optimization

Rigorous 5-fold cross-validation yielding R² 0.8062.

Exhaustive hyperparameter sweeps via GridSearchCV with 5-fold cross-validation optimized tree depth, feature splits, and leaf samples to achieve an R² of 0.8062 and MAE of 0.3261.

Validation5-Fold Cross-Validation
R² Score0.8062 accuracy
MAE0.3261 error margin
GridSearchCVCross-ValidationHyperparameter Tuning
estimator/ml/grid_search_tuning.py
from sklearn.model_selection import GridSearchCV

param_grid = {'n_estimators': [100, 200], 'max_depth': [20, 30, None]}
grid_search = GridSearchCV(estimator=RandomForestRegressor(), param_grid=param_grid, cv=5, scoring='r2')
grid_search.fit(X_train, y_train)
Scikit-Learn / FastAPIOptimized Weights
04 of 04

API Serving Boundary

Sub-10ms inference serving via FastAPI and Joblib.

Tuned model weights are serialized using Joblib and loaded into a lightweight FastAPI service, enabling instantaneous predictions through documented Swagger REST endpoints.

BackendFastAPI Async API
ArtifactsSerialized Joblib model
DocumentationInteractive Swagger /docs
FastAPIJoblibREST EndpointsSwagger Docs
estimator/api/main.py
from fastapi import FastAPI
import joblib

app = FastAPI()
model = joblib.load("random_forest_model.joblib")

@app.post("/predict")
def predict_price(data: HouseFeatures):
    prediction = model.predict([data.to_array()])
    return {"predicted_price": float(prediction[0])}
Scikit-Learn / FastAPIOptimized Weights