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

相关内容

热门资讯

透视阶段!werplan免费挂... 透视阶段!werplan免费挂下载(透视)poker world辅助器(辅助)一直有神器(哔哩哔哩)...
透视模块!pokemmo手机版... 透视模块!pokemmo手机版透视脚本(透视)pokemmo辅助器脚本下载(辅助)本来一直总是有攻略...
透视法门!拱趴大菠萝十三水作必... 透视法门!拱趴大菠萝十三水作必弊(透视)xpoker辅助工具(辅助)一直存在有神器(哔哩哔哩)1、拱...
透视秘籍!哈糖大菠萝软件下载(... 透视秘籍!哈糖大菠萝软件下载(透视)xpoker怎么作必弊(辅助)总是有神器(哔哩哔哩)1、每一步都...
透视攻略!epoker透视(透... 透视攻略!epoker透视(透视)德州私人局脚本(辅助)切实一直都是有方法(哔哩哔哩)1、德州私人局...
透视方针!哈糖大菠萝破解器(透... 透视方针!哈糖大菠萝破解器(透视)pokemmo手机脚本(辅助)一贯真的是有方法(哔哩哔哩)1、游戏...
透视教程书!哈糖大菠萝怎么开挂... 透视教程书!哈糖大菠萝怎么开挂(透视)德州之星扫描器(辅助)确实是真的有神器(哔哩哔哩)1、游戏颠覆...
透视策略!来玩app破解(透视... 透视策略!来玩app破解(透视)pokermaster修改器(辅助)其实真的有app(哔哩哔哩)一、...
透视妙计!pokernow辅助... 您好,pokernow辅助控制这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302...
透视方案!hh poker插件... 透视方案!hh poker插件下载(HHpoker开挂)一贯真的有辅助app(哔哩哔哩)1、让任何用...