Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

y_hat values are stored in a tuple?

I am trying to evaluate mean-absolute error for an ARIMA model, but I could not access elements in the tuple.

from statsmodels.tsa.arima_model import ARIMA, ARIMAResults
from sklearn.metrics import mean_squared_error

predictions=[]
model=ARIMA(train_data,order=(1,1,2))
model_fit=model.fit(disp=False)
yhat=model_fit.forecast(17)
predictions.append(yhat[0:1])
type(predictions)
Ouput:list
type(prediction[0])
output:tuple
predictions: output
[(array([68152871.32674411, 72984056.7853417 , 76062659.58175865,
     78169358.67414317, 79737083.58271562, 81005917.59334147,
     82109000.12354675, 83120164.32017158, 84080354.73347473,
     85012277.37380035, 85928523.97564033, 86836077.34993815,
     87738809.8503163 , 88638868.91033678, 89537445.40029526,
     90435199.72342199, 91332498.10971542]),)]

Comments