Skip to content

ForecastX with mix of future known and future unknown predictors #4378

Answered by fkiraly
yarnabrina asked this question in Q&A
Discussion options

You must be logged in to vote

the problem in your example seems to be the funny indexing of pandas when you use colon with dates.
Unlike the very same indexing with integers (!), it produces overlapping folds.

The chain of cause/effect for the problem:

  • X_tr, X_ts both end up containing 1960
  • so you're asking the forecaster to predict 1961, 1962, 1963 (fh=[1,2,3] starting from period 0 = 1960). I think you probably intended to ask it to predict 1960, 1961, 1962.
  • either way, you're passing known data (X_ts) only for 1960, 1961, 1962
  • so in the pooled X in predict, you end up with missing data in 1963 (from the X-forecast and the X-known, 1963 is present in X-forecast but missing in X-known)
  • but the y-forecaster ARIMA can…

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by yarnabrina
Comment options

You must be logged in to vote
2 replies
@yarnabrina
Comment options

yarnabrina Mar 23, 2023
Collaborator Author

@fkiraly
Comment options

Comment options

yarnabrina
Mar 23, 2023
Collaborator Author

You must be logged in to vote
3 replies
@fkiraly
Comment options

@fkiraly
Comment options

@fkiraly
Comment options

Comment options

You must be logged in to vote
4 replies
@yarnabrina
Comment options

yarnabrina Jun 27, 2024
Collaborator Author

@fkiraly
Comment options

@yarnabrina
Comment options

yarnabrina Jun 27, 2024
Collaborator Author

@geronimos
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
module:forecasting forecasting module: forecasting, incl probabilistic and hierarchical forecasting
3 participants