Slackbot
08/13/2023, 2:37 PMKevin Kho
08/13/2023, 11:24 PMh
needs to equal the predict
. So try h=24
, and then they can be broadcastedKevin Kho
08/14/2023, 12:16 AMfrom statsforecast.utils import ConformalIntervals
# Create a list of models and instantiation parameters
intervals = ConformalIntervals(h=24, n_windows=2)
mstl = MSTL(
season_length=[24, 24 * 7], # seasonalities of the time series
trend_forecaster=AutoARIMA(prediction_intervals=intervals) # model used to forecast trend,
)
sf = StatsForecast(
models=[mstl], # model used to fit each time series
freq='H', # frequency of the data
)
sf = sf.fit(df=df)
forecasts = sf.predict(h=24, level=[90])
forecasts.head()
Kevin Kho
08/14/2023, 12:16 AMprediction_intervals
on the MSTL
class doesn’t work quite yet. You need to use it on the models (again, on the master branch)Matej
08/14/2023, 9:15 AMMatej
08/14/2023, 9:15 AMKevin Kho
08/14/2023, 4:55 PM