The following models were used to predict californian house prices and evaluated:
🏆 XGBOOST achieved lowest rmse: 47989.31 (root mean squared error) so was chosen for website.
Basic FastAPI server is used to serve the XGBoost model and predict house prices.
POST /predict
{
"longitude": -122.23,
"latitude": 37.88,
"housing_median_age": 41,
"total_rooms": 880,
"total_bedrooms": 129,
"population": 322,
"households": 126,
"median_income": 8.3252,
"ocean_proximity": "NEAR BAY"
}
{
"model": "xgboost",
"predicted_value": 416807.44
}
The front-end is built using Streamlit, providing a simple UI for users to input housing features and get real-time predictions.
Available here.