简体   繁体   English

Statsmodel ARIMA多输入

[英]Statsmodel ARIMA multiple input

I want to create my first (seasonal) ARIMA model but I find the Statsmodel ARIMA documentation insufficient. 我想创建我的第一个(季节性)ARIMA模型,但是我发现Statsmodel ARIMA 文档不足。 I lack information about calculating the prediction from multiple arrays (these are numpy arrays). 我缺少有关从多个数组(这些是numpy数组)计算预测的信息。 These numpy arrays are series of values for each minute of a day. 这些numpy数组是一天中每一分钟的一系列值。 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? 有关如何执行此操作的任何建议/建议/链接/提示?

I am using Python 3.6. 我正在使用Python 3.6。

You will need to put your arrays into a single multidimensional array-like structure (Pandas DataFrame or NumPy array). 您将需要将数组放入单个多维数组状结构(Pandas DataFrame或NumPy数组)。 Assume you have two arrays a = [1, 2, 3] and b = [4, 5, 6] : 假设您有两个数组a = [1, 2, 3]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

See this blog post for a more comprehensive example of creating an ARIMA model. 有关创建ARIMA模型的更全面的示例,请参见此博客文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM