Potato Joe
Potato Joe

Reputation: 17

How can I predict a target time series feature given the feature and one other time series feature?

I've been scouring the net for something like this, but I can't quite figure it out.

enter image description here

Here is my data. I am trying to predict 'Close' using both the time series data from 'Close' as well as the time series data from 'Posts'. I've tried looking into documentation on SARIMA, auto arima, etc... and I'm not getting anywhere. Does anyone have any idea on how this could be done in Python? This is a pandas dataframe.

Upvotes: 0

Views: 421

Answers (1)

mmiron
mmiron

Reputation: 164

import pmdarima

arima_model = pmdarima.auto_arima(arima_final['Close'].values, X=arima_final['Posts'].values)
arima_model.predict(5, X=...)

That's the simplest way I know of to do what you're asking (use a model, presumably an ARIMA model, to predict future values of Close). The X argument is the exogenous data. Note that you'll also need to provide it with exogenous data when predicting, hence the X=... in the code above.

Upvotes: 1

Related Questions