Statsmodel ARIMA multiple input

北战南征 提交于 2019-12-08 11:28:13

问题


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?

I am using Python 3.6.


回答1:


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

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



来源:https://stackoverflow.com/questions/49235508/statsmodel-arima-multiple-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!