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

[BUG] fix STLForecaster tag ignores-exogenous-X to be correctly set for composites #5365

Merged
merged 4 commits into from Oct 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions sktime/forecasting/trend/_stl_forecaster.py
Expand Up @@ -180,6 +180,21 @@ def __init__(
self.forecaster_resid = forecaster_resid
super().__init__()

for forecaster in (
fkiraly marked this conversation as resolved.
Show resolved Hide resolved
self.forecaster_trend,
self.forecaster_seasonal,
self.forecaster_resid,
):
if forecaster is not None and not forecaster.get_tag(
"ignores-exogeneous-X"
):
ignore_exogenous = False
break
else: # none of the forecasters (if provided) use exogenous feature variables
ignore_exogenous = True # corresponding to NaiveForecaster in missing case

self.set_tags(**{"ignores-exogeneous-X": ignore_exogenous})

def _fit(self, y, X, fh):
"""Fit forecaster to training data.

Expand Down