Downloads · 30 days
0
srivardhan/california-housing-price-prediction
california-housing-price-prediction is a machine learning model from srivardhan. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A Gradient Boosting Regressor trained on the California Housing dataset from scikit-learn to predict median house values.
Downloads · 30 days
0
Access
Public
Updated May 10, 2026
Repo size
1.3 MB
Likes
0
Public
Click a slice to open those files.
.joblib1.3 MB · 99%
From the Hugging Face model README
A Gradient Boosting Regressor trained on the California Housing dataset from scikit-learn to predict median house values.
| Model | R² Score | RMSE | MAE |
|---|---|---|---|
| Gradient Boosting ✅ | 0.8397 | 0.4583 ($45,829) | 0.3030 ($30,298) |
| Random Forest | 0.8004 | 0.5115 ($51,147) | 0.3332 ($33,322) |
| Linear Regression | 0.5758 | 0.7456 ($74,558) | 0.5332 ($53,320) |
Cross-validation (5-fold) R²: 0.6768 ± 0.0606
sklearn.datasets.fetch_california_housing| Feature | Description |
|---|---|
| MedInc | Median income in block group |
| HouseAge | Median house age in block group |
| AveRooms | Average number of rooms per household |
| AveBedrms | Average number of bedrooms per household |
| Population | Block group population |
| AveOccup | Average number of household members |
| Latitude | Block group latitude |
| Longitude | Block group longitude |
import joblib
import numpy as np
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(
repo_id="srivardhan/california-housing-price-prediction",
filename="california_housing_model.joblib"
)
model = joblib.load(model_path)
# Predict - input features: [MedInc, HouseAge, AveRooms, AveBedrms, Population, AveOccup, Latitude, Longitude]
sample = np.array([[8.3252, 41.0, 6.984127, 1.023810, 322.0, 2.555556, 37.88, -122.23]])
prediction = model.predict(sample)
print(f"Predicted house value: ${prediction[0] * 100000:,.0f}")
california_housing_model.joblib — Trained modelscaler.joblib — StandardScaler (for Linear Regression usage)model_metadata.json — Full metrics and configurationtraining_script.py — Complete training scriptMIT
<!-- ml-intern-provenance -->This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.