I am using statsforecast
package and fitting AutoARIMA model. Code looks like the following.
forecast = {}
models = {}
for item in Ids:
sf = StatsForecast(
models=[
AutoARIMA()
],
freq='M'
)
d = train_data[train_data['unique_id']==item
sf.fit(d)
f = sf.predict(h=3)
forecast[item] = f
models[item] = sf.fitted_[0][0].model_
I would expect different models with different parameters to be fitted for different Ids. Because, there are variability in the data. But it is fitting the same model for all the cases.
When I run in two different Jupyter
Notebooks, I get two different models for two different sources of data. But I run model for each id, I am getting only one model for all the ids. I explored about setting different seeds, but I couldn't find any. When I run auto ARIMA, i would expect to see atleast more than one model\parameters. How do I get this?
Most of the models in the
statsforecast
are the local model which means they train one model per unique value so you don't need to loop to fit each unique value. You can access parameters of each model bysf.fitted_[<idx>, 0].model_