You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using mstl_decomposition if I'm passing a multiple frequencies like 7 and 365 for daily data then I'm getting an error saying "KeyError: "['seasonal'] not in index"" because when applying multiple frequencies the name of the resulting variables will be seasonal7 and seasonal365
Versions / Dependencies
statsforecast 1.7.5
Reproduction script
from statsforecast import StatsForecast
from statsforecast.feature_engineering import mstl_decomposition
from statsforecast.models import MSTL, AutoARIMA
#Here i used 12 and 24 for season length just for demonstration
model = MSTL(season_length=[12, 24], trend_forecaster=AutoARIMA())
df_feat, df_fut = mstl_decomposition(df, model=model, freq="M", h=horizon)
Issue Severity
None
The text was updated successfully, but these errors were encountered:
Hey @Jonathan-87, thanks for raising this. The current implementation leverages a function that adds up the seasonal components into one, so the easiest fix would be to always add up the seasonal components, however I realize that it may be better to have them as individual features. What would be the expected output for you? Generating a trend + one feature for each seasonal component or just trend + seasonal (where the seasonal is the sum of all components)?
What happened + What you expected to happen
When using mstl_decomposition if I'm passing a multiple frequencies like 7 and 365 for daily data then I'm getting an error saying "KeyError: "['seasonal'] not in index"" because when applying multiple frequencies the name of the resulting variables will be seasonal7 and seasonal365
Versions / Dependencies
statsforecast 1.7.5
Reproduction script
from statsforecast import StatsForecast
from statsforecast.feature_engineering import mstl_decomposition
from statsforecast.models import MSTL, AutoARIMA
df = pd.read_csv('https://datasets-nixtla.s3.amazonaws.com/air-passengers.csv', parse_dates=['ds'])
#Here i used 12 and 24 for season length just for demonstration
model = MSTL(season_length=[12, 24], trend_forecaster=AutoARIMA())
df_feat, df_fut = mstl_decomposition(df, model=model, freq="M", h=horizon)
Issue Severity
None
The text was updated successfully, but these errors were encountered: