Toni Borders
11/03/2023, 4:33 PMfrom statsforecast import StatsForecast
def fit():
model = StatsForecast(df=panel_df,
models=[AutoARIMA(), SeasonalNaive(season_length=7)],
freq='D',
n_jobs=1,
verbose=True)
model.fit(panel_df)
model.save('/Users/tmb/PycharmProjects/data-science/UFE/output_files/model')
Error:
AttributeError: type object 'StatsForecast' has no attribute 'save'
I have the latest version of the package installed (e.g. 1.6.0)José Morales
11/03/2023, 4:40 PMimport pickle
with open('your_model.pkl', 'wb') as f:
pickle.dump(model, f)
Toni Borders
11/03/2023, 4:41 PMStatsForecast.plot(panel_df, df)
José Morales
11/03/2023, 4:42 PMToni Borders
11/03/2023, 4:43 PMJosé Morales
11/03/2023, 4:50 PMToni Borders
11/03/2023, 4:52 PMx = StatsForecast.plot(panel_df)
x.savefig('testfig.png')
José Morales
11/14/2023, 3:40 PMgit+<https://github.com/Nixtla/statsforecast|https://github.com/Nixtla/statsforecast>
Ramon Botella Nieto
11/14/2023, 3:46 PM