This project implements a linear regression model to predict house prices in Boston based on various features. It includes a Jupyter notebook for data analysis and model training, as well as a Streamlit app for interactive predictions.
House Prediction - Linear Regression.ipynb: Jupyter notebook containing data analysis, model training, and evaluationapp.py: Streamlit app for interactive house price predictionsBostonHousing.csv: Dataset with Boston housing datarequirements.txt: Required Python packagessetup.py: Package setup fileProcfileandsetup.sh: Files for Heroku deployment
The notebook performs the following steps:
- Loads and explores the Boston housing dataset
- Preprocesses the data
- Splits data into training and test sets
- Trains a linear regression model
- Evaluates model performance
- Visualizes results
The Streamlit app allows users to:
- Input housing features via sliders
- Get a predicted house price based on those inputs
To run the Streamlit app locally:
pip install -r requirements.txt
streamlit run app.py
The app is also deployed on Heroku for online access.
The linear regression model achieves:
- R-squared: 0.669
- Mean Squared Error: 24.29
Visualizations in the notebook show the model's predictive performance.