Index of exogenous variable passed to .predict() #6874
Unanswered
amurthy-sunysb
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I think what you are observing is explained by this particular estimator ignoring the index of the This is a minor inconsistency, it might be worth thinking about what should happen here, if the index passed does not match the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to understand the index of the exogenous variable X that needs to be passed to the .predict() function. What explains the three outputs for the different exog dataframes passed into .predict functions below? Specifically:
Why does .predict() work when X_train is passed, which is missing the indices corresponding to fh ?
Why is the output same when X_test and X are passed?
What does this mean in the documentation: If
self.get_tag("X-y-must-have-same-index")
,X.index
must containfh
index reference. This tag is True for the forecaster below.The outputs are as follows.
y_pred_X_test
1960-08 | 635.259370
1960-09 | 609.253811
1960-10 | 564.324084
1960-11 | 532.170112
1960-12 | 526.405133
y_pred_X_train
1960-08 | 635.259370
1960-09 | 612.309800
1960-10 | 564.309419
1960-11 | 519.339836
1960-12 | 513.604385
y_pred_X
1960-08 | 635.259370
1960-09 | 609.253811
1960-10 | 564.324084
1960-11 | 532.170112
1960-12 | 526.405133
Beta Was this translation helpful? Give feedback.
All reactions