auto_arima函数中出现“ValueWarning:Nosupportedindexisavailable的
创始人
2024-11-12 16:30:49
0

在进行时间序列分析时,auto_arima函数会根据数据集自动选择最优的ARIMA模型,但是当输入的时间索引不是支持的索引类型时,就会出现“ValueWarning: No supported index is available”错误。

为了解决这个问题,需要将时间索引转换为支持的类型。一种解决方法是将时间索引转换为DatetimeIndex类型。下面是具体的代码示例:

from pandas import read_csv from pandas import datetime from pandas import DatetimeIndex from pmdarima.arima import auto_arima

加载数据集

series = read_csv('data.csv', header=0, index_col=0, parse_dates=True, squeeze=True)

将时间索引转换为DatetimeIndex类型

index = DatetimeIndex(series.index)

使用auto_arima函数进行分析

model = auto_arima(series, start_p=1, start_q=1, max_p=3, max_q=3, m=12, start_P=0, seasonal=True, d=1, D=1, trace=True, error_action='ignore', suppress_warnings=True, stepwise=True) print(model.summary())

相关内容

热门资讯

发现玩家!wepoker私人局... 发现玩家!wepoker私人局透视教程,wpk刷入池率脚本,扑克教程(有挂方法);小薇(透视辅助)致...
我来分享!htx矩阵wepok... 1、我来分享!htx矩阵wepoker辅助,epoker透视底牌,攻略教程(有挂透视);详细教程。2...
分辨真假!德普软件,wepok... 自定义wepoker私人局透视教程系统规律,只需要输入自己想要的开挂功能,一键便可以生成出微扑克专用...
必备教程!wpk俱乐部辅助器,... 必备教程!wpk俱乐部辅助器,wepoker透视脚本下载,透明教程(有挂方法);玩家必备必赢加哟《1...
程序员教你!wepoker插件... 程序员教你!wepoker插件功能辅助器,pokerrrr2辅助,存在挂教程(有挂辅助);小薇(透视...
推荐十款!hhpoker有没有... 推荐十款!hhpoker有没有外挂,佛手在线大菠萝技巧,新版2025教程(有挂教程),支持语音通讯、...
盘点几款!epoker免费透视... 1、盘点几款!epoker免费透视脚本,德普之星辅助器,透视教程(有挂神器)2、进入游戏-大厅左侧-...
一分钟教会你!hhpoker有... 1、一分钟教会你!hhpoker有辅助吗,wepoker脚本下载,曝光教程(有挂透明);详细教程。2...
推荐攻略!wejoker辅助软... 1、推荐攻略!wejoker辅助软件价格,wepoker底牌透视脚本,大神讲解(有挂方法)(UU p...
重磅来袭!德州真人透视脚本,p... 1、重磅来袭!德州真人透视脚本,pokerworld修改器,技巧教程(有挂透视);详细教程。2、德州...