This project is a Machine Learning-based Expense Prediction System that predicts future monthly expenses based on historical data. It uses Linear Regression to identify trends and forecast upcoming expenses.
- 📊 Predicts next month's expense using past data
- 📈 Visualizes data with a regression line
- 🟢 Highlights future prediction on graph
- 🔁 Uses synthetic large dataset with random variation
- 📉 Calculates model error (MSE)
- Python
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
Expense_Project/
│
├── data.csv # Dataset
├── generate_data.py # Script to generate large dataset
├── model.py # ML model (Linear Regression)
├── main.py # Main execution file
├── plot.py # Graph visualization
├── requirements.txt # Dependencies
-
Data Generation
- Synthetic data is generated with a trend + random variation
- Simulates real-world expense behavior
-
Model Training
-
Linear Regression learns the relationship between:
- Month (input)
- Expense (output)
-
-
Prediction
- Model predicts future expense using learned trend
-
Visualization
- Blue dots → Actual data
- Red line → Regression trend
- Green dot → Future prediction
git clone https://github.com/your-username/Expense_Prediction_Project.git
cd Expense_Prediction_Project
pip install -r requirements.txt
python generate_data.py
python main.py
- Predicted Expense for Next Month
- Graph showing trend and prediction
- Mean Squared Error (MSE) is used to measure model performance
- Personal finance planning
- Budget forecasting
- Expense trend analysis
- Add multiple features (income, savings, etc.)
- Use advanced models (Polynomial Regression)
- Build web interface (Streamlit)
- Real-time data integration
Sandeep Choudhary B.Tech AI & Data Science Arya College of Engineering & IT, Jaipur
Give it a star ⭐ on GitHub!