Statsmodel ARIMA 多输入 [英] Statsmodel ARIMA multiple input

查看:27
本文介绍了Statsmodel ARIMA 多输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建我的第一个(季节性)ARIMA 模型,但我找到了 Statsmodel ARIMA 文档不足.我缺乏有关从多个数组(这些是 numpy 数组)计算预测的信息.这些 numpy 数组是一天中每一分钟的一系列值.我想使用去年每一天的数据进行预测.

I want to create my first (seasonal) ARIMA model but I find the Statsmodel ARIMA documentation insufficient. I lack information about calculating the prediction from multiple arrays (these are numpy arrays). These numpy arrays are series of values for each minute of a day. I want to make the prediction using data from each day of the last year.

关于如何做到这一点的任何建议/建议/链接/提示?

Any advice/suggestions/links/hints on how to do that?

我使用的是 Python 3.6.

I am using Python 3.6.

推荐答案

您需要将数组放入一个类似多维数组的结构(Pandas DataFrame 或 NumPy 数组)中.假设你有两个数组 a = [1, 2, 3]b = [4, 5, 6]:

You will need to put your arrays into a single multidimensional array-like structure (Pandas DataFrame or NumPy array). Assume you have two arrays a = [1, 2, 3] and b = [4, 5, 6]:

data = np.dstack([a, b])
model = statsmodels.tsa.arima_model.ARIMA(data, order=(5,1,0)) # fits ARIMA(5,1,0) model

请参阅这篇博文以获得更全面的信息创建 ARIMA 模型的示例.

See this blog post for a more comprehensive example of creating an ARIMA model.

这篇关于Statsmodel ARIMA 多输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆