Regressors with pinball loss and an fev loader, for M5

Aperta
#267 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@jovo ci sta già lavorando.

Dal 4/12/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Part of #164. Builds what the M5 runs need: regressor versions of the prospective learners, trained on the pinball loss, and a loader that streams m5_1D from fev. Decided on #164: pinball loss over fev's 9 quantile levels with each series weighted by one over its SQL scale; evaluation by fev's own SQL and MASE with $K = 1$ and $w_{\Delta} = 1/H$; scored on fev's window and on rolling windows; M5 loaded at run time, never committed.

Following scikit-learn without asking: the classes are ProspectiveRegressor, TorchMLPRegressor and HistGradientBoostingRegressor, and predict(X, *, t) returns the median, shape (n_samples,), as scikit-learn regressors return one point per sample.

Questions

  1. How M5 becomes a stream. Proposal: step $t$ is a day, and its samples are the 30,490 series that day, so M5 is a setting with many samples per step, like periodic-poisson. $x$ is that day's known covariates (price, 4 event flags, the state's SNAP flag) plus the series' static columns. That is 1,941 steps and about 59 million samples. Alternatives: (b) subsample series, for example one store's 3,049, or (c) aggregate to the 10 stores.
    Recommended: (b) one store first, then all series once the code works.
  2. The static columns. Item, department, category, store and state. With 3,049 items, one-hot inputs are wide. Options: (a) department, category, store and state one-hot, item left out; (b) also a learned item embedding in the MLP, with the item as a categorical feature in the trees.
    Recommended: (a) first.
  3. The target's own past. As written, the learner reads $(t, x_{t})$ and never lagged $y$. Every fev baseline forecasts from lagged $y$, and the M5 winners used lag features. Options: (a) no lags, the prospective learner as written; (b) lags of $y$ at offsets of at least $H = 28$ as extra covariates, known at forecast time; (c) both, as two arms.
    Recommended: (c). Without lags the learner sees no level for each series beyond its static columns, so (a) alone is likely to lose for that reason, not for lack of time.
  4. Time features for daily data. The harmonic features have periods $2, 4, \ldots, 50$ steps at their default 50 features, which miss the week (7) and the year (365.25). Options: (a) harmonic as is; (b) sines and cosines at periods 7 and 365.25 and their first few harmonics, as a new frequencies choice.
    Recommended: (b), with (a) as a second arm.
  5. How quantiles are returned. scikit-learn has no method for several quantiles at once. Proposal: predict_quantiles(X, *, t, quantiles) returns shape (n_samples, n_quantiles), in the order of quantiles, which must be among the levels fit. The trees fit one model per level, so they take the levels as a parameter, quantiles=(0.1, ..., 0.9); so does the MLP, for its head width.
  6. Rolling windows. Proposal: checkpoints every 28 days over the last two years, 26 checkpoints, each scored on the next 28 days, plus fev's own window. A batch arm refits at each checkpoint on all steps so far.
  7. Arms first. Proposal: batch MLP and batch GBT, each with and without time features, then the online MLP. Baselines first: fev's seasonal naive and Chronos-2 through its existing worker, then LightGBM.

🤖 Generated with Claude Code

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
2h 9m
PR unite (30g)
164

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di neurodata/prolearn

Tutte le issue di neurodata/prolearn

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.