A Machine Learning regression project that predicts Item_Outlet_Sales for retail products
based on product and outlet characteristics, using the Big Mart Sales dataset.
👉 👉 Try it live here
- Load and clean the dataset (fill missing
Item_Weightwith mean,Outlet_Sizewith mode) - Standardize inconsistent labels in
Item_Fat_Content(LF,low fat,Low Fat→Low Fat) - One-hot encode categorical features
- Train and compare Linear Regression and Random Forest Regressor
- Select the best-performing model and use it for predictions
| Model | R² Score | MAE | RMSE |
|---|---|---|---|
| Linear Regression | unstable (severe overfitting from raw ID columns) | — | — |
| Random Forest ✅ | ~0.56 | ~765 | ~1094 |
- Python, Pandas, NumPy
- scikit-learn (
RandomForestRegressor,LinearRegression) - Matplotlib (visualizations in the notebook)
- Streamlit (web app)
Sales_Prediction_Machine_Learning.ipynb— full analysis notebook (EDA, visualizations, model comparison)app.py— interactive Streamlit web appTrain.csv— training datasettestdata.csv— test datasetrequirements.txt— Python dependencies
Notebook version:
pip install -r requirements.txt
jupyter notebook Sales_Prediction_Machine_Learning.ipynbWeb app version:
pip install -r requirements.txt
streamlit run app.py- Hyperparameter tuning (GridSearchCV) for Random Forest
- Try Gradient Boosting / XGBoost for potentially better accuracy
- Add cross-validation for more robust performance estimates