问题描述
我想创建我的第一个(季节性)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多输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!