Closed Azlich closed 1 year ago
Hey @Azlich, thanks for using statsforecast.
As the error states you have two options:
from statsforecast.utils import ConformalIntervals
models = [MSTL(
season_length=[24, 24 * 7],
trend_forecaster=AutoARIMA(prediction_intervals=ConformalIntervals(h=24)), # define the intervals here
)]
sf = StatsForecast(
models=models,
freq='H',
)
sf = sf.fit(df=df)
sf.predict(h=24, level=[90])
from statsforecast.utils import ConformalIntervals
models = [MSTL(
season_length=[24, 24 * 7],
trend_forecaster=AutoARIMA(),
prediction_intervals=ConformalIntervals(h=24), # define the intervals here
)]
sf = StatsForecast(
models=models,
freq='H',
)
sf = sf.fit(df=df)
sf.predict(h=24, level=[90])
Please let us know if you have further doubts.
Thank you for your response.
Does this mean that MSTL doesn't support Probabilistic forecasting natively? So I need to use Conformal Prediction to make probabilistic forecasts for the MSTL model.
I saw the StatsForecast's Models page (https://nixtla.github.io/statsforecast/src/core/models_intro.html
) states that MSTL supports Probabilistic Forecasting.
I'm new to this topic. But thanks a lot for your help.
You'd need the conformal intervals for the trend forecaster in case it doesn't support producing prediction intervals out of the box but in this case the ARIMA model does, so this indeed seems like a bug. We'll work on it and have a fix soon. Thanks for raising this!
Issue not fixed
What happened + What you expected to happen
I follow MSTL tutorial from MultipleSeasonalities notebook (
https://github.com/Nixtla/statsforecast/blob/main/nbs/docs/tutorials/MultipleSeasonalities.ipynb
). I got Exception: You have to instantiate either the trend forecaster class or MSTL class withprediction_intervals
to calculate them in prediction interval stepI expected to run the code without error and get prediction interval
Versions / Dependencies
StatsForecast 1.6.0
Reproduction script
Issue Severity
None