statsforecast icon indicating copy to clipboard operation
statsforecast copied to clipboard

Better description/information on Exception: no model able to be fitted

Open renanklehm opened this issue 2 years ago • 1 comments

I'm trying to fit several models in a group of time series, using the following code:

fcst = StatsForecast(df=Y_train_df, models=[ AutoARIMA(season_length=12), AutoCES(season_length=12), SeasonalNaive(season_length=12), HistoricAverage(), RandomWalkWithDrift(), ], freq='M', n_jobs=-1)

But sometimes I get the exception "no model able to be fitted", which just informs me that there is something wrong. It would be nice if the exception were more informative, describing which unique_id and model failed to fit.

renanklehm avatar Nov 08 '22 11:11 renanklehm

Thanks for creating the issue @renanklehm, this has been requested before and we are working on it.

Meanwhile, you might find the fallback_model argument useful. You can check the documentation here.

Fit the models using Naive as a fallback model: fcst = StatsForecast(df=Y_train_df, models=[ AutoARIMA(season_length=12), AutoCES(season_length=12), SeasonalNaive(season_length=12), HistoricAverage(), RandomWalkWithDrift(), Naive() ], fallback_model=Naive(), freq='M', n_jobs=-1)

mergenthaler avatar Nov 08 '22 14:11 mergenthaler