Replies: 2 comments 7 replies
-
Sorry for the late reply, this was a long post! If I understand correctly, you want to find out how you can manually apply the The point is, the That would be via Example code: pipe_y = ForecastingPipeline(
steps=[
("ytox", YtoX()),
("summarizer", WindowSummarizer(**kwargs, n_jobs=1, target_cols=['monthly_demand'])),
("forecaster", forecaster),
]
)
pipe_y.fit(y=df, fh=fh)
pipe_y.predict(fh=fh) or, shorter, note, if you have exogenous data and want to use it instead of replace it with the summary features, you also need to use a pipe_y = ForecastingPipeline(
steps=[
("id-plus-ytox", Id() + YtoX()),
("summarizer", WindowSummarizer(**kwargs, n_jobs=1, target_cols=['monthly_demand'])),
("forecaster", forecaster),
]
)
pipe_y.fit(y=df, fh=fh)
pipe_y.predict(fh=fh) the If you want to apply the WindowSummarizer only to the Short version is |
Beta Was this translation helpful? Give feedback.
-
@fkiraly I think your answer is confusing when you say "note, if you have exogenous data and want to use it instead of replace it with the summary features, you also need to use a FeatureUnion, e.g., ...", but then you do not use exogenous data in fit() nor predict(). I have tried to directly add it and it produces an error. |
Beta Was this translation helpful? Give feedback.
-
Hi!, I'm using recursive forecasting using XGBoost and WindowSummarizer. The number of series that i want to predict is large, and I want to make a custom model for each one, so i think about generating a lot of lags and window and then include a FeatureSelection method in my pipeline to select the best lags and windows for each series, but I got some problems while using a pipeline.
As I understood in the examples, using a pipeline with a WindowSummarizer as first step should casuse the same effect as a make_reduction method with a WindowSummarizer transformer inside, but at least in my code it doesn't.
While using the make reduction with the transformer inside the method creates an object that predict the desired series. That's perfect
But when I use the pipeline (TransformedTargetForecaster) the generated object is fitted to each of the features created by the WindowSummarizer
Note: all the lags and windows that i'm trying to create are based on the target.
Here is my code to reproduce the problem:
Get data and basic variables/parameters
Option 1: Make reduction + window summarizer
The result was:
Option 2: pipeline + Make reduction
The result was a prediction for each of the generated columns by the WindowSummarizer:
Anyone knows how to use the pipeline properly ?
Beta Was this translation helpful? Give feedback.
All reactions