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())

相关内容

热门资讯

透视中牌率!uupoker有透... 透视中牌率!uupoker有透视吗(透视)真是有辅助工具(证实有挂)-哔哩哔哩1、起透看视 uupo...
目前来看!wepoker公共底... 目前来看!wepoker公共底牌(透视)原来是有辅助工具(真实有挂)-哔哩哔哩wepoker公共底牌...
透视线上!wepoker透视脚... 透视线上!wepoker透视脚本苹果版(透视)本来是真的辅助神器(的确有挂)-哔哩哔哩1、完成wep...
透视有挂!pokemmo辅助器... 透视有挂!pokemmo辅助器手机版下载(透视)一贯存在有辅助工具(有挂教程)-哔哩哔哩亲,关键说明...
透视教程!hhpoker透视脚... 透视教程!hhpoker透视脚本(透视)好像存在有辅助插件(真是有挂)-哔哩哔哩1、点击下载安装,h...
透视新版!德州hhpoker是... 透视新版!德州hhpoker是真的吗(透视)总是真的有辅助神器(揭秘有挂)-哔哩哔哩一、德州hhpo...
据玩家消息!佛手在线大菠萝为什... 您好,佛手在线大菠萝为什么都输这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302...
今天上午!we-poker是什... 今天上午!we-poker是什么软件(透视)真是存在有辅助辅助器(揭秘有挂)-哔哩哔哩今天上午!we...
有消息称!we-poker辅助... 有消息称!we-poker辅助器(透视)其实是真的辅助软件(确实有挂)-哔哩哔哩1、任何we-pok...
现有关情况通报如下!wepok... 现有关情况通报如下!wepoker辅助是真的吗(透视)真是存在有辅助下载(确实有挂)-哔哩哔哩1、该...