Regressors with pinball loss and an fev loader, for M5

未关闭
#267 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@jovo 已经在做这个了。

开始于 2026年12月4日。

评估

这个 Issue 还没有评估数据。

描述

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

主要语言
Python
星标
0
派生
0
平均合并
2 小时 9 分钟
30 天内合并 PR
164

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

neurodata/prolearn 的其他 Issue

查看 neurodata/prolearn 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。