The result
XGBoost recorded 0.4841 validation RMSLE versus 0.9884 for Ridge on the July 17–31, 2017 split.
Demand-model comparison with time order preserved
Academic experiment

Recorded 0.4841 validation RMSLE with XGBoost versus 0.9884 for Ridge after combining five Favorita datasets on a contiguous time-based split.
From the repository
Daily sales forecasts for every store × product family of Corporación Favorita, an Ecuadorian grocery chain, using the Kaggle Store Sales – Time Series Forecasting data. The pipeline runs from exploratory analysis and feature engineering through a leakage-free validation split, three gradient-boosting models with Optuna tuning, and a linear baseline.
flowchart LR
RAW[train · test · stores<br/>transactions · oil · holidays] --> EDA[EDA &<br/>correlations]
EDA --> FE[Feature engineering<br/>oil interpolation · calendar ·<br/>holidays · one-hot]
FE --> SPLIT[Time-based split<br/>train < 2017-07-17<br/>val 07-17 → 07-31]
SPLIT --> M[LightGBM · CatBoost ·<br/>XGBoost · Ridge]
M --> TUNE[Optuna tuning]
TUNE --> SUB[Forecast CSVs<br/>2017-08-01 → 08-15]
Validation RMSLE (lower is better):
| Model | Validation RMSLE |
|---|---|
| XGBoost | 0.4841 |
| LightGBM | 0.4933 |
| CatBoost | 0.5274 |
| Ridge regression (baseline) | 0.9884 |
The tree ensembles roughly halve the linear baseline's error. Tuned hyperparameters are in outputs/.
Python · pandas · NumPy · statsmodels · scikit-learn · LightGBM · CatBoost · XGBoost · Optuna · matplotlib · seaborn
Retail-Sales-Forecasting/
├── sales_forecasting.ipynb # EDA → features → models → tuning
├── forecast_utils.py # data loading, preprocessing, RMSLE, CSV export
├── outputs/ # tuned hyperparameters (best_params_*.json)
└── requirements.txt
pip install -r requirements.txt
# Download the competition data (requires a Kaggle account + API token)
kaggle competitions download -c store-sales-time-series-forecasting
mkdir -p data/store-sales-time-series-forecasting
unzip store-sales-time-series-forecasting.zip -d data/store-sales-time-series-forecasting
jupyter lab sales_forecasting.ipynb
If the data lives somewhere else, set DATA_DIR. Generated forecasts go to outputs/, or to OUTPUT_DIR if you set it.
Date finished: April 20, 2026
Continue exploring · 34 projects

Fullstack

ML & AI

ML & AI

ML & AI
Distributed Systems

Fullstack

ML & AI
Distributed Systems

Distributed Systems
Distributed Systems
Distributed Systems

Data Engineering
Data Engineering

Data Engineering

Data Engineering

Data Engineering

ML & AIViewing
ML & AI
Data Engineering

Fullstack

Fullstack
Fullstack

Fullstack

Fullstack
Data Engineering
Computing Foundations

Fullstack

Fullstack
ML & AI
ML & AI

ML & AI
ML & AI
ML & AI
ML & AI