Flatten project folder structure and fix notebook links in READMEs

This commit is contained in:
rezayaghobi-dev
2026-07-11 17:35:27 +03:30
parent 9c32e47c30
commit 309627fa50
9 changed files with 9 additions and 6 deletions

View File

@@ -0,0 +1,35 @@
# California Housing Price Prediction
End-to-end supervised regression pipeline predicting median house value from census-block-level data.
## Overview
Full pipeline from raw data to a tuned, evaluated model: EDA, stratified train/test splitting, feature engineering, a leak-free sklearn preprocessing pipeline, baseline model comparison, cross-validation, hyperparameter tuning, and a final held-out evaluation with a confidence interval.
## Approach
1. **EDA** — explored feature distributions, geographic price spread, and correlation with the target. `median_income` was the strongest predictor (r ≈ 0.69).
2. **Stratified split** — training/test split stratified on binned `median_income`, so both sets represent all income bands proportionally instead of relying on a lucky random draw.
3. **Feature engineering** — derived ratio features (`rooms_per_house`, etc.) that are more semantically meaningful per-household than the raw per-block counts.
4. **Preprocessing pipeline** — all transforms wrapped in sklearn `Pipeline`/`ColumnTransformer` to guarantee no data leakage and identical transforms on train/test.
5. **Model comparison** — Linear Regression vs Decision Tree baselines, evaluated with 5-fold cross-validation (not just training accuracy).
6. **Hyperparameter tuning** — `GridSearchCV` over tree depth and an RBF-kernel feature transform.
7. **Final evaluation** — test set touched exactly once, after all modeling decisions were locked in.
## Results
| Metric | Value |
|---|---|
| MAE | $40,600 |
| RMSE | $61,901 |
| R² | 0.72 |
| 95% CI on RMSE | [$59,141 — $64,542] |
## Tech stack
Python, pandas, scikit-learn, matplotlib, seaborn
## Notebooks
- [`housing-ml-notebook.ipynb`](housing-ml-notebook.ipynb) — original notebook, my own work
- [`housing_ml_notebook_polished.ipynb`](housing_ml_notebook_polished.ipynb) — same analysis with AI-assisted documentation and formatting added for readability

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long