Use transformations for future-unknown exogenous features for use with ForecastX
#5872
Unanswered
yarnabrina
asked this question in
Q&A
Replies: 2 comments 5 replies
-
FYI @benHeid, implicitly a pipeline/graphical issue |
Beta Was this translation helpful? Give feedback.
1 reply
-
How about he transformation pipeline expects all columns to be present during the transform call, even if some of them are not available for future predictions. One way to solve this issue is to conditionally apply transformations based on whether the columns are present or not.
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, is there a way in sktime to allow transformations of exogenous features, but not all of them are available during prediction? As of now, it's failing for me with
ValueError
fromsklearn
validation check duringtransform
call.To give some context, I've a set of exogenous features, and only a proper subset will be known in some shape or form for future, others are unknown. So I pass them accordingly to ForecastX. If that's it, and there's no transformations, it's all fine.
But if I add transformations, for example scaling for X features, predictions start failing complaining that no features are passed during predictions. All my transformations have a dedicated ColumnSelect step before the transformer itself.
Is there any conditional transformer to check if columns present or not and transform only if present?
Sample Code
In the last line, if I pass full
X_test
it does not fail as transformation step is happy and forecasting step ignores it completely. The issue is I will not have those columns in any of actual scenario.Note: I'm not using dunder methods mainly because I like being explicit, but also because I don't know how to convert this to that for all steps. A lot of stuff here needs to be configurable for me, e.g. if there are X or not, if yes, are all future-known or are few future-unknown, whether transform X or not, whether transform y or not, etc. These are configurable based on inputs from a GUI, not just in tuning sense. If there's a easy way to convert this to dunder or graphical, I'll be happy to learn.
Beta Was this translation helpful? Give feedback.
All reactions