statsforecast icon indicating copy to clipboard operation
statsforecast copied to clipboard

TypeError AutoARIMA.__init__() got an unexpected keyword argument 'season_length'

Open wasf84 opened this issue 9 months ago • 1 comments

What happened + What you expected to happen

Hi!

I’m encountering an error when using the AutoARIMA model. While searching for a solution, I noticed that a specific parameter is mentioned in the library’s documentation. In this context, is "period" the correct parameter to use?

Thank you. <3

Versions / Dependencies

StatsForecast 2.0.1

Reproducible example

mdl_arima = [ AutoARIMA( d = 1, max_p = 6, season_length = 365, stationary = True, ) ]

sf = StatsForecast(models=mdl_arima, freq='D') sf.fit(df=train_diff)

Issue Severity

None

wasf84 avatar Apr 29 '25 17:04 wasf84

Is it possible to add another issue to this report?

I replaced "season_length" with "period" in the parameters, which initially worked. However, when I call the "fit()" method on the StatsForecast object, I encounter this error:


AttributeError Traceback (most recent call last) sf = StatsForecast(models=md_arima, freq='D', n_jobs=NJOBS) ---> sf.fit(df=diff_treino)

File ~/bin/miniconda3/envs/py311/lib/python3.11/site-packages/statsforecast/core.py:665, in StatsForecast.fit(self, df, prediction_intervals, id_col, time_col, target_col) 663 self.set_prediction_intervals(prediction_intervals=prediction_intervals) 664 if self.n_jobs == 1: --> 665 self.fitted = self.ga.fit( 666 models=self.models, fallback_model=self.fallback_model 667 ) 668 else: 669 self.fitted = self._fit_parallel()

File ~/bin/miniconda3/envs/py311/lib/python3.11/site-packages/statsforecast/core.py:75, in GroupedArray.fit(self, models, fallback_model) 73 fm[i, i_model] = new_fallback_model.fit(y=y, X=X) 74 else: ---> 75 raise error 76 return fm

File ~/bin/miniconda3/envs/py311/lib/python3.11/site-packages/statsforecast/core.py:67, in GroupedArray.fit(self, models, fallback_model) 65 for i_model, model in enumerate(models): 66 try: ---> 67 new_model = model.new() 68 fm[i, i_model] = new_model.fit(y=y, X=X) 69 except Exception as error:

AttributeError: 'AutoARIMA' object has no attribute 'new'

wasf84 avatar Apr 29 '25 17:04 wasf84