requires_fh_in_fit#
- requires_fh_in_fit()[source]#
Behaviour flag: forecaster requires forecasting horizon in fit.
String name:
"requires-fh-in-fit"
Public behaviour flag
Values: boolean,
True
/False
Example:
False
Default:
True
If the tag is
True
, the forecaster requires the forecasting horizon to be passed in thefit
method, i.e., thefh
argument must be non-None
.If the tag is
False
, the forecasting horizon can be passed in thefit
method, but this is not required. In this case, it must be passed later, wheneverpredict
or other prediction methods are called.Whether the
fh
is required infit
is an intrinsic property of the forecasting algorithm and not a user setting.For instance, direct reduction to tabular regression requires the
fh
as it is used by the fitting algorithm to lag the endogeneous against the exogeneous data. In contrast, recursive reduction to tabular regression does not require thefh
infit
, as only the prediction step requires the forecasting horizon, when applying the fitted tabular regression model by sliding it forward over thefh
steps.