check_fit_predict_without_exogenous¶
yohou.testing.forecaster.check_fit_predict_without_exogenous(forecaster, y, requires_exogenous=False, target_as_feature='transformed', forecasting_horizon=3)
¶
Check forecaster behavior when X_actual=None at fit time.
Validates two clear-cut scenarios based on requires_exogenous tag
and target_as_feature parameter:
requires_exogenous=False: fit(y, X_actual=None) succeeds and predict() returns valid output.requires_exogenous=True+target_as_feature=None: fit(y, X_actual=None) raisesValueError.
When requires_exogenous=True and target_as_feature is not
None, the check is skipped because behaviour depends on the
specific forecaster (some compositions always require X_actual).
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
forecaster
|
BaseForecaster
|
Fitted forecaster instance (will be cloned). |
required |
y
|
DataFrame
|
Target time series with |
required |
requires_exogenous
|
bool
|
Value of the |
False
|
target_as_feature
|
str or None
|
Value of the |
"transformed"
|
forecasting_horizon
|
int
|
Forecasting horizon to use for fit/predict. |
3
|