1

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.

Jan Pisl
  • 1,043
  • 2
  • 14
  • 29

1 Answers1

2

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.

Max Mikhaylov
  • 772
  • 13
  • 32
  • Thanks, but when I do what you say, it doesn't really work. See [this](https://stackoverflow.com/questions/49301997/multiple-inputs-into-statsmodels-arima-in-python). Any idea why that happens? – Jan Pisl Mar 15 '18 at 14:52