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
[ENH] by-horizon forecaster, for different estimator/parameter per horizon #4811
Conversation
I don't have any strong opinions on this. It does look like it could solve the problem I have, but requires quite a lot of user code. I think/hope I might be confused because I thought what I'm doing was pretty much stock-standard time series analysis and would be how the default, simple, inflexible would work. Can you confirm whether or not this particular use case should be currently possible?
Everything I've tried fails in some way:
So is this use case (X and y data, want to put lags of y into X) actually impossible at the moment, and this PR resolves that? Or is there something I've missed. |
Yes - the idea is to make it possible first (the combination of unlagged Tbh the off-shelf reducers should work here. Btw, it would be great if you could paste some code for |
OK I'm glad you agree its odd that it's not supported, that means I'm not going crazy :) Actually it seems I've just discovered a way. I think I can wrap my whole pipeline in make_reduction(
HistGradientBoostingRegressor(),
transformers=[
WindowSummarizer(
lag_feature={"lag": range(1, target_lags + 1)},
truncate="bfill",
n_jobs=n_jobs,
),
],
pooling="global",
window_length=None,
) Haven't tested thoroughly, and it still has a tiny leak due to |
No, not at all. It is not uncommon that features are added consecutively on estimators (e.g., global, use of That's why we wanted to start with a re-design in 2022, which has the "right user interface" imo, it ended up working, but being computationally too expensive. So the next step is keeping the interface but making it faster. |
Fixes #3018
Implements a forecaster
FhPlexForecaster
that allows to specify different parameters per forecasting horizon.To specify different forecasters, combine with
MultiplexForecaster
orMultiplexTransformer
.Potentially useful in #4776 (comment).
FYI @davidgilbertson, would appreciate feedback.
Currently does not have as features (but should have?)
fh
indices per forecaster_HeterogenousMetaEstimator
- I already prepared the_forecasters
attr for that but didn't yet test it with inheritance. Hopefully works out of the box.