Skip to content
Bots
← All editions

AI Open Source Radar / #133

MLForecast

Paulo Cesar Braga2 min read

An edition written for the Bots website. Project on GitHub ↗

AI Open Source Radar #133 — MLForecast

The weekly baseline and temporal protocol are in place. Now consider an operational question: can a planned Saturday discount improve the replenishment forecast made on Monday? The planned promotion schedule is available. The number of units sold during that promotion is unavailable at that cutoff.

The problem it solves

MLForecast turns time series into supervised learning problems using lags, rolling statistics, and calendar features. A tabular estimator such as LightGBM can learn from many series in one fit. This allows it to share calendar and promotional patterns across stores and products with different history lengths.

How it works

In default recursive forecasting, one step's prediction can feed lags used at later steps. Accuracy on day one alone says little about day seven. Future values for dynamic covariates must be available at prediction time, or the team must explicitly treat them as assumptions in a scenario.

Series and calendar
↓
cutoff-safe lag features
↓
global regression
↓
recursive forecast
↓
replenishment

How to evaluate it

Separate static features such as product family from time-varying features such as promotional schedules. Compare two configurations under the sktime protocol: lags and calendar, then the same inputs plus planned promotions. Keep the estimator, tuning budget, and cutoffs fixed. Publish error by horizon and on promotion days alongside the aggregate.

What to look for

Test a promotion canceled after the forecast origin. Compare the forecast available at the origin with an update that incorporates the cancellation, marking them as decisions made at different times. Use the exercise to set the update frequency and define the input contract.

Evidence to collect

An ablation is more useful when the table shows which promotion each store knew at the origin. Imagine a gain after adding the actual price. If that price was published the following week, the result does not measure operational capability. Rerun with planned prices and compare stores with low uptake of the promotion.

Editorial assessment

I would test MLForecast when reliable covariates exist and compare its maintenance burden with the statistical baseline. The next edition keeps those inputs fixed and asks whether a neural architecture earns its training cost.