model-selection
Evaluate ordered pmdarima forecasts with sequential holdouts, rolling or sliding cross-validation, aligned exogenous data, and explicit error scoring without temporal leakage.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- model-selection
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Evaluate ordered pmdarima forecasts with sequential holdouts, rolling or sliding cross-validation, aligned exogenous data, and explicit error scoring without temporal leakage.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md7.5 KB
- 参考文档references/troubleshooting.md6.8 KB
- 参考文档references/workflows.md6.6 KB
- 脚本scripts/cross_validate_forecast.py8.3 KB
03 SKILL.md 正文
Model selection
Route here when the question is how to evaluate or compare forecasting
estimators on ordered observations. The route covers positional
train_test_split, RollingForecastCV, SlidingWindowForecastCV,
check_cv, cross_validate, cross_val_score, cross_val_predict, and
pmdarima.metrics.smape.
Route
- State the observation order, target
y, optional exogenous schema and availability-at-origin rule, forecast horizonh, untouched final holdout, scorer, and a fold/fit budget. - Use
train_test_splitfor one chronological holdout. UseRollingForecastCVfor expanding history orSlidingWindowForecastCVfor a fixed-size recent history. Materialize folds before fitting and inspect the exact boundaries. - Pass
yand the complete positionalXtogether.Xmust have one row peryrow, including test rows, and the same columns at fit and prediction. Fit feature transformations inside the estimator or pipeline on each fold; route feature construction to preprocessing. - Use
cross_val_scorefor one error per fold,cross_validatewhen fit and score timings are needed, andcross_val_predictfor forecast values. pmdarima returns raw errors: lower MAE, MSE, and SMAPE is better. - Map averaged predictions back to original positions with the materialized test indices. The default output omits training and uncovered positions and has no timestamp metadata.
- Keep
h,step, fold count, estimator order/search, and optimizer iterations bounded. Run the bundled local smoke test for a minimal check: cross_validate_forecast.py.
Read all three route references before making an evaluation decision: API reference, workflows, and troubleshooting.
Guardrails and handoffs
- Never shuffle or use random K-fold splitting for a forecast evaluation.
- Never let a training position reach its test fold, or derive test-time
Xfrom realized test targets. cross_val_predictrequiresstep <= h; otherwise it rejects the geometry rather than returning silently gapped predictions.scoring=Noneis invalid in this API. Supply an exact supported name or a callablemetric(y_true, y_pred).- A geometrically valid fold may still be too short for the chosen ARIMA, seasonal terms, differencing, or transformer. Route order, seasonality, estimator fitting, and forecast intervals to forecasting.
- Route target/exogenous feature construction, Fourier/date features, transformations, and pipeline fold-fitting to preprocessing.
The operating guidance is distilled from pmdarima v2.1.1 at commit
4c2dfccb28f64d2c00a5e10b59c1d1a3e16576a9, including model-selection source,
metrics, tests, examples, README usage, and the user-guide index. Runtime
files are self-contained and do not require the source checkout.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).