Gerard Conangla Planes
06/29/2023, 2:40 PMAkmal Soliev
06/29/2023, 2:59 PMfrom statsforecast import StatsForecast
from statsforecast.models import (
AutoARIMA,
)
# Create a list of models and instantiation parameters
models = [
AutoARIMA(season_length=24),
]
# Instantiate StatsForecast class as sf
sf = StatsForecast(
df=Y_df,
models=models,
freq='H',
n_jobs=-1,
verbose=True
)
sf.fit()
fitted_model = sf.fitted_
# save the models with pickle
empty_models = []
sf2 = StatsForecast(
df=Y_df,
models=test_models,
freq='H',
n_jobs=-1,
verbose=True
)
sf2.models = fitted_model
fitted_model
is multi-dim array that you can use to index it based on the prefered model and its iterationsDeepanjan Datta
09/24/2023, 4:58 PM