check_forecasting_horizon_positive¶
yohou.utils.validation.check_forecasting_horizon_positive(horizon, allow_none=False)
¶
Validate forecasting horizon is positive.
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
horizon
|
int or None
|
Forecasting horizon value. |
required |
allow_none
|
bool
|
Whether None is acceptable (for predict with optional horizon override). |
False
|
Raises¶
| Type | Description |
|---|---|
ValueError
|
If horizon is not positive or is None when not allowed. |
See Also¶
check_X_actual_required: Validate X_actual is provided for recursive prediction.check_sufficient_rows: Validate DataFrame has enough rows for an operation.