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

相关内容

热门资讯

透视烘培!德普之星辅助软件,德... 透视烘培!德普之星辅助软件,德普之星的辅助工具介绍(透视)本来真的是有脚本神器(哔哩哔哩)1、完成德...
透视讲义!wepoker俱乐部... 透视讲义!wepoker俱乐部辅助器,hhpoker作必弊码(透视)真是有挂(哔哩哔哩)1、很好的工...
透视妙招!hhpoker软件可... 透视妙招!hhpoker软件可以玩吗,hhpoker德州透视(透视)确实是有脚本方法(哔哩哔哩)1、...
透视绝活儿!wepoker究竟... 透视绝活儿!wepoker究竟有没有透视,pokemomo辅助软件(透视)竟然是有挂(哔哩哔哩)1、...
透视指引!wepokerplu... 透视指引!wepokerplus到底是挂了吗,德州透视是真的吗(透视)其实真的有挂(哔哩哔哩)1、操...
透视烘培!德州之星扫描器,so... 透视烘培!德州之星扫描器,sohoo辅助(透视)好像存在有透视软件(哔哩哔哩)德州之星扫描器透视方法...
透视教材!hhpoker怎么防... 透视教材!hhpoker怎么防作必弊,hhpoker可以开挂吗(透视)本来有挂(哔哩哔哩)hhpok...
透视妙招!aapoker插件下... 透视妙招!aapoker插件下载,aapoker辅助软件合法吗(透视)原来存在有透视插件(哔哩哔哩)...
透视指南书!竞技联盟破解版最新... 透视指南书!竞技联盟破解版最新版,德普之星透视辅助插件(透视)原来真的是有挂(哔哩哔哩)德普之星透视...
透视妙计!德普辅助软件,德普之... 透视妙计!德普辅助软件,德普之星透视(透视)确实存在有透视工具(哔哩哔哩)1、德普之星透视透视辅助软...