This project applies regularized regression techniques—Ridge and LASSO—on the Boston Housing dataset to demonstrate their effectiveness in handling multicollinearity and enhancing prediction accuracy.
- Source: Boston Housing Dataset
- Target Variable:
medv(Median house value)
- Load and preview the dataset
- Pre processing data: duplicate check, unvalid and missing value check, handling outlier
- Split data into:
- Pre-train: 80%
- Train 80%
- Validation 20%
- Test: 20%
- Pre-train: 80%
- Calculate VIF for multicollinearity check
- Feature scaling using
StandardScaler - Train Ridge & LASSO models with cross-validation
- Applied on test set
- Compare models using RMSE, MAE, MAPE, and R²
- Choose the best model
| Model | Train RMSE | Test RMSE | R² Score |
|---|---|---|---|
| Ridge | 4.47 | 3.23 | 75.32 |
| LASSO | 4.47 | 3.19 | 75.25 |
Regularized Regression using Python.ipynb: Full codeWorkflow.png: Python code workflow
#DataScience #MachineLearning #Regularization #RidgeRegression #LassoRegression #Modeling #PredictiveAnalytics #MLTips