BeyzaTopbas's picture
Update README.md
f9f9934 verified
metadata
title: Store Sales Forecasting
emoji: πŸš€
colorFrom: red
colorTo: red
sdk: docker
app_port: 8501
tags:
  - streamlit
pinned: false
short_description: Streamlit template space

πŸ›’ Store Sales Forecasting

This application predicts daily retail sales using a machine learning model trained on the CorporaciΓ³n Favorita dataset. The goal is to estimate how much a specific store will sell for a selected product family on a given date while taking promotional activity into account.

The model learns hidden sales patterns from historical data, including store-specific behavior, seasonal effects, and product demand. By combining these signals, it can generate realistic sales forecasts in real time.

πŸš€ How to Use

  1. Select the store number
  2. Choose a date
  3. Pick a product family
  4. Enter the number of items on promotion
  5. Click Predict Sales

The app will return the estimated daily sales.

🧠 Model

The final model used in this project is XGBoost Regressor.
It was selected because it performs very well on structured tabular data, captures non-linear relationships, and handles one-hot encoded categorical features efficiently.

To improve stability and reduce the effect of extreme values, the model was trained on a log-transformed target:

sales β†’ log1p(sales)

All predictions are automatically converted back to the original sales scale inside the app.

πŸ“Š Evaluation

Model performance is measured using RMSE (Root Mean Squared Error), which is the standard metric for regression and forecasting tasks because it penalizes large errors and is expressed in the same unit as the target variable.

⭐ Key Insight

The most important driver of sales is the product family, followed by store behavior, promotional activity, and seasonal time features. This shows that demand is primarily determined by what is being sold, while time and promotions influence short-term fluctuations.

🧰 Tech Stack

Scikit-learn
XGBoost
Pandas
NumPy
Streamlit

πŸ“¦ Files in This Space

  • model.pkl β†’ trained machine learning model
  • features.pkl β†’ feature order used during training
  • X_test.npy / y_test.npy β†’ evaluation data
  • streamlit_app.py β†’ application interface

πŸ‘©β€πŸ’» Author

Beyza Topbas