I faced with some error when using the ARIMAX.predict().
The ARIMAX example in documentation seems to train the whole model on OOS data. My problem is I need to predict future value based on current exogenous variables. Below is my dummy code:
# train the model
data = pd.DataFrame(dict(x=[45, 50, 55, 60, 70, 80, 90]))
data['y'] = 0.5 + data['x'] + scipy.stats.norm.rvs(scale=2, size=data.shape[0])
model = pf.ARIMAX(data=data, formula='y~1+x',ar=1, ma=0, family=pf.Normal())
model.fit("MLE")
data_new = pd.DataFrame(dict(x=[100, 120], y=[np.nan, np.nan]))
model.predict(h=2, oos_data=data_new)
The model was trained successfully, but when it came to predict, it just raised the Exception,
IndexError: index 0 is out of bounds for axis 0 with size 0.
Can anyone help me to find the correct way to use predict()? Do I need to assign the index of the oos_data?
Hi,
I faced with some error when using the ARIMAX.predict().
The ARIMAX example in documentation seems to train the whole model on OOS data. My problem is I need to predict future value based on current exogenous variables. Below is my dummy code:
The model was trained successfully, but when it came to predict, it just raised the Exception, IndexError: index 0 is out of bounds for axis 0 with size 0.
Can anyone help me to find the correct way to use predict()? Do I need to assign the index of the oos_data?