解决FutureWarning: The default method ‘yw‘ can produce PACF values outside of the [-1,1] interval.

出现了FutureWarning: The default method 'yw' can produce PACF values outside of the [-1,1] interval. After 0.13, the default will change tounadjusted Yule-Walker ('ywm'). You can use this method now by setting method='ywm'.

warnings.warn(

首先进行翻译:

FutureWarning:默认方法“yw”可能会产生[-1,1]区间之外的PACF值。0.13之后,默认值将更改为tounadjusted Yule Walker(“ywm”)。现在可以通过设置method='ywm'来使用此方法

方法一:设置method='ywm'

找到与PACF值有关的函数

fig = sm.graphics.tsa.plot_pacf(train, lags=20, ax=ax2)

修改后

fig = sm.graphics.tsa.plot_pacf(train, lags=20, ax=ax2,method='ywm')

此时运行不会出现警告

方法二:将statsmodels.api改成0.13之前的版本

未操作 但有利有弊 两版本的不同可能解决这个问题,但导致其他函数出现错误或警告

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值