Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is unexpected keyword argument 'typ' error thrown?

For typical integer values of p, d, q and a list of numbers, rollRate, the following code:

fit = statsmodels.api.tsa.ARIMA(rollRate, (p,d,q)).fit()
forecast = fit.predict(start=len(rollRate),
                       end = len(rollRate)+11,
                       typ = 'levels')

produces an error that I don't understand:

File "C:...\Anaconda3\lib\site-packages\statsmodels\base\wrapper.py", line 92, in wrapper return data.wrap_output(func(results, *args, **kwargs), how)

TypeError: predict() got an unexpected keyword argument 'typ'

I have also successfully predicted with other list variables, but this particular list is giving me an error. Any idea as to why predict() isn't accepting typ as a keyword argument when the source code says that it can?

like image 744
asdf Avatar asked Oct 20 '22 21:10

asdf


1 Answers

Ah, I see the issue. You don't have an ARIMA model. You have an ARMA model because d=0. ARMA.predict doesn't take a typ keyword argument because they don't need one.

like image 134
jseabold Avatar answered Nov 15 '22 13:11

jseabold