为什么引发意外的关键字参数“typ”错误?

2024-03-29 08:19:52 发布

您现在位置:Python中文网/ 问答频道 /正文

对于pdq和一系列数字rollRate的典型整数值,以下代码:

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

我不明白这是一个错误:

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'

我也成功地预测了其他列表变量,但是这个特定的列表给了我一个错误。你知道为什么predict()the source code says that it can时不接受{}作为关键字参数吗?在


Tags: 代码api列表len错误数字整数wrapper