I have been training ARIMA models using the statsmodels (v0.12.2) package, and would like to check out how a model fits on the training data
from statsmodels.tsa.arima.model import ARIMA
#for some p,d,q
model = ARIMA(train, order = (p,d,q)
model_fit = model.fit()
I would like to plot the predictions of the training set against the actual training values.
I have been trying to use the following after reading this documentation:
model_fit.get_prediction()
However, this returns:
<statsmodels.tsa.statespace.mlemodel.PredictionResultsWrapper at 0x7f804bf5bbe0>
How can I return these predicted values for the training set?
Advice appreciated!
I think you are looking for the fitted values of the model, if so then use,
model_fit.fittedvalues
You can find a complete example here.