Returns you haven’t seen yet: forecasting returns as a chain of forecasts
Forecasting
Survival Analysis
Supply Chain
Bayesian
Sales feed return initiations, which feed warehouse receipts. Fit the chain once, then push any sales forecast through it, uncertainty and all.
This post is a marimo notebook with its own layout, so it lives on its own page.
Warehouse receipts depend on the returns customers start this week, which depend on what sold last month and what sells this month. The post fits each step as its own small model with ttenet, chains them, and shows how one call propagates any sales forecast or weather scenario through the chain without refitting.
The page above is a static snapshot. To run it, including the sales and weather scenario controls, open the notebook on molab and click Run it now, or run it locally:
git clone https://github.com/kylejcaron/ttenet && cd ttenet
uv sync --all-extras
uv run marimo run examples/retail_returns_blog.py