utilsforecast/future-exog-zero-horizon
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| UtilsForecast | warning | none, edit by hand | All versions |
utilsforecast.feature_engineering.future_exog_to_historic shifts future-unknown exogenous columns by h steps so they become historic features. Its default is h=0, which silently returns the input DataFrame unchanged and an empty future DataFrame.
train_df, future_df = future_exog_to_historic(df, freq="D", features=["temp"])train_df, future_df = future_exog_to_historic(df, freq="D", features=["temp"], h=7)What the rule reports
Section titled “What the rule reports”Calls to future_exog_to_historic that omit h or pass h=0 or a negative integer literal.
How to fix it
Section titled “How to fix it”Pass the positive forecast horizon h matching the number of steps ahead the model predicts.
Diagnostic message
Section titled “Diagnostic message”future_exog_to_historic defaults to h=0 and returns the frame unchanged with an empty future frame. Pass a positive forecast horizon h.See all rules in the UtilsForecast pack.