Lag transforms on multiple unique_id values #192
elisevansartefact
started this conversation in
General
Replies: 1 comment
-
Hey. We've thought of adding something to compute features aggregated at different levels as you suggest here but it's currently not possible. I'll create an issue for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I want to use lags of y for each unique_id, and lag transformations such as rolling mean per unique_id, this is easy enough to do:
MLForecast(models = [MODELS], lags = [1, 2], lag_transforms={1: [(rolling_mean, 4)]})
However, in order to include insights about the global trend, what if I want to include features which are transformations of the lags of every unique_id (not just one unique_id)?
For instance, what if I want to include the 4-week rolling mean of the sum of y for every unique_id? Or the mean of all the y_lag1 for each unique_id?
I suppose that this can be done via MLForecast.preprocess, however perhaps I am missing an easier way, and if not, perhaps a global_lag_transforms could be added in future as a parameter of MLForecast?
Beta Was this translation helpful? Give feedback.
All reactions