season_dummy – Calendar dummy variables (month-of-year, quarter-of-year).#
Back to op axis | Back to L3 | Browse all options
Operational op under axis
op, sub-layerL3_A_step_op, layerl3. Standalone callable:mf.functions.season_dummy_transform.
Function signature#
mf.functions.season_dummy_transform(
panel: pd.DataFrame,
season: str enum {"quarter", "month"},
) -> pd.DataFrame
Parameters#
name |
type |
default |
constraint |
description |
|---|---|---|---|---|
|
|
— |
— |
Input panel. Each column is a variable; rows are time periods. Series is promoted to a single-column DataFrame internally. |
|
|
|
— |
Seasonal granularity hint. Accepted values: “quarter” and “month”. Currently validated but has no effect on output (deprecated – kept for API compatibility). Non-DatetimeIndex inputs produce season_* columns; DatetimeIndex inputs produce month_* columns. |
Returns#
pd.DataFrame — scalar result.
Behavior#
Generates params.n - 1 0/1 indicators for the calendar period (drops one to avoid multicollinearity with intercept). Standard frequentist seasonality control.
When to use
Capturing calendar seasonality in linear models when a smooth Fourier basis would over-shrink discrete jumps.
In recipe context#
Set params.op = "season_dummy" in the relevant layer to activate this op within a recipe:
# Layer L3 recipe fragment
params:
op: season_dummy
References#
macroforecast design Part 2, L3: ‘feature engineering is a DAG of typed transforms; cascade-depth bounds the longest chain at cascade_max_depth.’