This web application helps estimate the annual cost of living based on inputs like state, metro area, number of parents, children, and whether childcare is needed. Users can compare estimated costs with the median family income to see how affordable life is in a given scenario.
- Algorithm Used: Linear Regression
- Training Data: Over 30,000 cleaned and preprocessed records
- Evaluation Metrics:
- Mean Squared Error (MSE)
- R-squared Score: 0.99 (very high accuracy)
The model was trained to predict the total annual cost given specific family and location conditions. It uses encoded state information and matches combinations of inputs for fast, reliable predictions.
- Frontend: HTML, CSS (no static folder used)
- Backend: Flask (Python)
- Model Handling:
joblib
for loading the state encoder - Data: CSV dataset for cost lookup, trained locally
- Model: Linear Regression model trained through Jupyter Notebook
- Clone the repo
- Make sure
state_encoder.pkl
andcost_lookup.csv
are in the root folder - Run the Flask app:
python app.py
This project is licensed under the MIT License.