Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lag transforms on different levels of aggregation #194

Open
jmoralez opened this issue Aug 30, 2023 Discussed in #192 · 0 comments
Open

Lag transforms on different levels of aggregation #194

jmoralez opened this issue Aug 30, 2023 Discussed in #192 · 0 comments
Labels

Comments

@jmoralez
Copy link
Member

Discussed in #192

Originally posted by elisevansartefact August 30, 2023
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant