I am trying to extract the estimated (not predicted) values from the auto_arima model of the pmdarima library, I have not been able to. I have tried with:modl.fit()
and it does not generate the values that later I need them to graph together with the training values
len(train) = len(mod1.fit())
import pmdarima as pm
import matplotlib.pyplot as plt
import numpy as np
data = pm.datasets.load_lynx()
train, test = model_selection.train_test_split(data, train_size=90)
# Fit a simple auto_arima model
modl = pm.auto_arima(train, start_p=1, start_q=1, start_P=1, start_Q=1,
max_p=5, max_q=5, max_P=5, max_Q=5, seasonal=True,
stepwise=True, suppress_warnings=True, D=10, max_D=10,
error_action='ignore')
# ---- plot (train and fitted (yhat) values
plt.plot(train)
plt.plot(modl.fit())
plt.show()