Akmal Soliev
02/22/2023, 3:11 PMdf = process_df()
models = [
AutoARIMA(max_D=12, season_length=12),
]
sf = StatsForecast(
df=df,
sort_df=True,
models=models,
freq='M',
n_jobs=-1,
)
Sam Miller
02/22/2023, 3:56 PMfitted_models = sf.fit().fitted_
You can then pickle these fitted models. Note there may be more than one model.
When you want to load them again:
new_sf = StatsForecast(df=df, models=placeholder_models) # the models you put in here are irrelevant
sf.fitted_ = fitted_models
sf.predict(horizon)
Akmal Soliev
02/22/2023, 4:04 PM.fit
is callable of StatsForecast
class. That assumption is based on the fact that when calling .forecast
method it autofits the models.
First question: Would it be better to call .fit
after initiating the class with all the params?
Second question: would fit
create ?incapsulated list? with all the fitted models? hence this code:
[model.fitted_ for model in sf.fit()]
Sam Miller
02/22/2023, 4:06 PMAkmal Soliev
02/22/2023, 4:08 PMfit
and predict
in the case of manual fitting.
Would be great to have a PR about creating a save
method.Kevin Kho
02/22/2023, 7:25 PMAkmal Soliev
02/23/2023, 3:26 PMsf.fit().fitted_
I can see replicas of the a single model that was issues, are they same model but fitted with different params?
AutoARIMA example:
[array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=objec
t), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=ob
ject), array([AutoARIMA], dtype=object), array([AutoARIMA], dtype=object)]
Sam Miller
02/23/2023, 4:32 PMAkmal Soliev
02/23/2023, 4:50 PMSam Miller
02/23/2023, 4:50 PMAkmal Soliev
02/23/2023, 4:51 PMSam Miller
02/23/2023, 5:00 PMKevin Kho
02/23/2023, 5:50 PMMartin Bel
03/13/2023, 5:20 PMPiotr Pomorski
03/14/2023, 12:35 PM