statsmodles 调用 params 时出现 AR 模型错误 [英] statsmodles AR model error when calling params

查看:19
本文介绍了statsmodles 调用 params 时出现 AR 模型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

statsmodels 新手,尝试使用 statsmodels.tsa.ar_model 来拟合 Pandas 时间序列.

New to statsmodels, trying to use statsmodels.tsa.ar_model to fit a pandas timeseries.

#pull one series from dataframe
y=data.sentiment
armodel=sm.tsa.ar_model.AR(y, freq='D').fit()
armodel.params()

得到以下错误:

C:\Python27\lib\site-packages\pandas\lib.pyd in pandas.lib.SeriesIndex.__set__ (pandas\lib.c:27817)()
AssertionError: Index length did not match values

有什么想法吗?

推荐答案

如果可以,您应该升级到当前的 master.这已在此处修复.

You should upgrade to current master, if you can. This was fixed here.

这篇关于statsmodles 调用 params 时出现 AR 模型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆