https://github.com/nixtla logo
#general
Title
# general
d

Dihong Huang

07/16/2023, 4:29 PM
Hi I wonder what this error is? Models are specified already
m

Max (Nixtla)

07/16/2023, 4:41 PM
Could you share the code?
d

Dihong Huang

07/16/2023, 4:46 PM
Sorry there is confidentiality, but this is how I initiate the model within a self-defined class: sf = StatsForecast( df = self.aggregated, models = self.sf_models, freq = ‘Q’, n_jobs = -1 ) and the models are [AutoARIMA(), AutoETS(), AutoCES(), AutoTheta(), TSB(0.9,0.1), CrostonOptimized(), Naive()]
And this is how the object looks like:
Copy code
StatsForecast(models=[AutoARIMA,AutoETS,CES,AutoTheta,TSB,CrostonOptimized,Naive])
m

Max (Nixtla)

07/16/2023, 4:52 PM
It would be good if you specified the seasonal length.
d

Dihong Huang

07/16/2023, 5:02 PM
Is seasonal length 4 for quarterly data?
m

Max (Nixtla)

07/16/2023, 5:04 PM
Yes
d

Dihong Huang

07/16/2023, 5:13 PM
Adding seasonal length doesn’t change the error
I still don’t know why it says no regressors
This is the full error message
I found that all the auto models are problematic and both TSB and CrostonOptimized has zero division error. Only Naive works
m

Max (Nixtla)

07/16/2023, 5:48 PM
Its hard to debug without seeing the code or having an idea of the data. If you could provide an anonymized version it would be easier to help. That exception is normally raised in the context of exogenous variables of the ARIMA model.
But it sounds to me like it has to do with the data frame you are passing.
Maybe this tutorial can help you with the exogenous regressors: https://nixtla.github.io/statsforecast/docs/how-to-guides/exogenous.html
k

Kevin Kho

07/16/2023, 6:31 PM
I believe this is when you have exogenous regressors, but aren’t supplying them for the prediction/forecast like what Max said.
This might be a good thread also: https://github.com/Nixtla/statsforecast/issues/435
d

Dihong Huang

07/16/2023, 6:48 PM
Thank you! I found that my dataframe contains extra columns like other ids which I didn’t intend to use as extra regressors but the models took them in
Now they work perfectly!
k

Kevin Kho

07/16/2023, 6:48 PM
Nice!
m

Max (Nixtla)

07/16/2023, 6:49 PM
🙌
d

Dihong Huang

07/17/2023, 11:13 PM
Hi do you know what could be the cause of this error? Seems like the problem came from the CES model but this code worked perfectly with a smaller dataset.