Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Retail Sales Prediction (Big Mart Sales)

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.

🌐 Live Demo

👉 👉 Try it live here

🧠 How it works

  1. Load and clean the dataset (fill missing Item_Weight with mean, Outlet_Size with mode)
  2. Standardize inconsistent labels in Item_Fat_Content (LF, low fat, Low FatLow Fat)
  3. One-hot encode categorical features
  4. Train and compare Linear Regression and Random Forest Regressor
  5. Select the best-performing model and use it for predictions

📊 Model Performance

Model R² Score MAE RMSE
Linear Regression unstable (severe overfitting from raw ID columns)
Random Forest ~0.56 ~765 ~1094

🛠️ Tech Stack

  • Python, Pandas, NumPy
  • scikit-learn (RandomForestRegressor, LinearRegression)
  • Matplotlib (visualizations in the notebook)
  • Streamlit (web app)

📂 Files

  • Sales_Prediction_Machine_Learning.ipynb — full analysis notebook (EDA, visualizations, model comparison)
  • app.py — interactive Streamlit web app
  • Train.csv — training dataset
  • testdata.csv — test dataset
  • requirements.txt — Python dependencies

▶️ How to run locally

Notebook version:

pip install -r requirements.txt
jupyter notebook Sales_Prediction_Machine_Learning.ipynb

Web app version:

pip install -r requirements.txt
streamlit run app.py

📌 Future Improvements

  • Hyperparameter tuning (GridSearchCV) for Random Forest
  • Try Gradient Boosting / XGBoost for potentially better accuracy
  • Add cross-validation for more robust performance estimates

About

"ML-basedhttps://sales-prediction-ml-4994.streamlit.app/ app with live Streamlit demo"

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages