🏠 House Price Prediction with XGBoost
This project is a Machine Learning pipeline for predicting house prices using the XGBoost Regressor.
It processes real estate data, performs feature engineering, trains a predictive model, and visualizes results with various plots.
📌 Features
- Data Preprocessing
- Handles missing values
- Removes irrelevant columns
- Encodes categorical features
- Scales numerical features
- Feature Engineering
- Price per square foot
- Total rooms (
bedrooms + bathrooms)
- Basement indicator (
is_basement)
- Living-to-above-ground ratio
- Outlier Removal
- Excludes houses priced above ₹5,000,000
- Model Training
- Uses
XGBRegressor with a preprocessing pipeline
- Train-test split for evaluation
- Evaluation Metrics
- R² Score
- MAE (Mean Absolute Error)
- RMSE (Root Mean Squared Error)
- MSE (Mean Squared Error)
- Data Visualization
- Correlation heatmap
- Distribution plots
- Scatter plots
- Box plots
- Actual vs. Predicted price comparison
🛠 Tech Stack
- Programming Language: Python
- Libraries:
- Data Processing:
pandas, numpy
- Machine Learning:
scikit-learn, xgboost
- Visualization:
matplotlib, seaborn