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 the fit method, i.e., the fh argument must be non-None.

If the tag is False, the forecasting horizon can be passed in the fit method, but this is not required. In this case, it must be passed later, whenever predict or other prediction methods are called.

Whether the fh is required in fit 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 the fh in fit, as only the prediction step requires the forecasting horizon, when applying the fitted tabular regression model by sliding it forward over the fh steps.