About Project

Favorita — EDA, Forecasting & Inventory Optimization

Live EDA to understand demand (promotions, holidays, cities, perishables) → forecasting by SKU×store with multi-window backtesting → ordering policies that balance service level and waste.

1) The Challenge

In perishables, deciding how much and when to order simultaneously impacts fill rate, stockouts, and waste. We need granular visibility to design features and rules that support daily decisions by category and store.

2) Approach

  1. Interactive EDA: filters by family/city/promo/perishable; sales vs. oil/transactions; DOW analysis.
  2. Feature & split: lags/moving averages, promo/holiday flags, seasonality; multi-window backtesting.
  3. Forecasting: models per SKU×store; WAPE/MAPE metrics and intervals for inventories.
  4. Perishable inventories: ordering policy with shelf life, lead time, and service target.
  5. Executive KPIs: forecast accuracy, service, stockouts, and waste (Looker).
Forecast
WAPE < 20%
Accuracy
Service
≥ 95%
SLA
Stockouts
↓ sustained
Guardrails
Waste
↓ controlled
Shelf life

3) Findings

Seasonality & DOW

Strong weekly patterns

DOW explains a large share of variability; enables cadence rules by day of the week.

Promos/Holidays

Spikes that bias the history

Flags and cooldown windows reduce bias and prevent post-event over-ordering.

Heterogeneity

Differences by city & perishability

Differentiated policies and targets raise service without spiking waste.

Inventories

Orders with shelf life

Including shelf life and lead time in optimization reduces both stockouts and waste.

4) Next Step

  1. Wave rollout: critical categories → rest; store-level guardrail KPIs.
  2. A/B/holdout by category: measure uplift in service and waste; weekly report.
  3. Orchestration: daily job for forecast + order recommendation; drift monitoring.
  4. Governance: feature catalog, model versioning, experiment logbook.

Analytical Modules

Exploratory

Interactive EDA

Filters by family/city/promo/perishable; sales vs. oil/transactions; DOW analysis.

  • Hypotheses & drivers
  • Outliers & anomalies
  • Feature inputs
BI

Executive KPIs

Forecast accuracy, service, stockouts, and waste by category/store.

  • Store filters
  • Series & comparisons
  • Export & share
Paper

Technical Paper

Perishable Inventory Optimization — full consultancy-style write-up.

  • Deterministic & scenario LP
  • Shelf life + lead time
  • Service vs. waste trade-off

Tech Stack

Docker (DB runtime)

Containerized database for reproducible local/CI runs and isolated test data.

Linear Optimization

OR-Tools / PuLP / SciPy linprog for LP/MILP ordering policies with shelf-life & lead-time constraints.

Streamlit

Interactive web app to explore forecasts and simulate ordering policies. Enables business users to test service–waste trade-offs and scenario plans without coding.

Looker

Executive dashboards for forecast accuracy, service, stockouts, and waste.

LaTeX

Technical paper (formulations, duals, KKT) and publication-ready figures.

Scope & Limitations

Scope
  • Operational EDA → Forecast → Order pipeline.
  • Auditable metrics (WAPE/MAPE, service, stockouts, waste).
  • Targets differentiated by city/category.
  • Dashboards in Looker for executive tracking.
Limitations
  • Sensitivity to promos/holidays and store mix.
  • Demand drift; requires periodic retraining.
  • Integration with operations for policy adoption.
  • Dependence on transactional data quality.