← ClaudeAtlas

anofox-forecast-modelslisted

Forecasting models and the `ts_forecast_by` API surface of the anofox_forecast DuckDB extension. Covers 33 models (baseline, exponential smoothing, state-space, ARIMA, Theta, multi-seasonal, intermittent-demand, distributional Laplace with three variants), parameter surfaces (MAP + STRUCT), model selection guidance, and common workflow gotchas. Use when picking a model or writing `ts_forecast_by` / `ts_forecast_agg` calls.
DataZooDE/anofox-forecast · ★ 35 · AI & Automation · score 74
Install: claude install-skill DataZooDE/anofox-forecast
# Anofox Forecast — Models & `ts_forecast_by` Cheat Sheet **Extension:** `anofox_forecast` v0.15.3 (Rust crate `anofox-forecast` v0.15.3) | **DuckDB:** v1.4.5 LTS / v1.5.4+ | **Dual naming:** `ts_*` and `anofox_fcst_ts_*` 33 forecasting models exposed by SQL via three call surfaces (table macro, aggregate, scalar). ## Critical gotchas 1. **Seasonality is NOT auto-detected.** All models — including the `Auto*` family — treat `seasonal_period` as user-supplied. Run `ts_detect_periods_by` first and pass the result explicitly. See `anofox-forecast-detection`. 2. **Model names are case-sensitive.** `'AutoETS'` works, `'autoets'` errors. 3. **`ts_forecast_by` requires frequency as the 7th positional param.** No default: ```sql -- WRONG (missing frequency): ts_forecast_by('sales', id, ds, y, 'Naive', 12) -- CORRECT: ts_forecast_by('sales', id, ds, y, 'Naive', 12, '1d') ``` 4. **STRUCT + MAP both work in params.** STRUCT keeps numeric params typed (recommended): ```sql -- STRUCT (recommended) ts_forecast_by(..., 'HoltWinters', 12, '1d', {seasonal_period: 7}) -- MAP (all strings, legacy) ts_forecast_by(..., 'HoltWinters', 12, '1d', MAP{'seasonal_period': '7'}) ``` 5. **The `_by` output renames the target column to `y`** and adds `forecast_step`, `yhat`, `yhat_lower`, `yhat_upper`, `model_name`. 6. **`ts_forecast_agg` takes `(date, value, model, horizon, params)` directly** — no `LIST(...)` wrapping. ## `ts_forecast_by` (primary surface)