I am still quite new to python and I can't figure out how to do this:
I have a pandas dataframe (data) with two columns: date and values (integers).
I feed this dataframe into an auto_arima
method.
stepwise_model = auto_arima(data, start_p=1, start_q=1,
test='adf',
max_p=2, max_q=2, m=7,
start_P=0, seasonal=True,
d=None, D=1, trace=True,
error_action='ignore',
suppress_warnings=True,
stepwise=True)
plt.plot(data,color='r')
plt.plot(stepwise_model.predict(),color='g')
plt.show()
My objective would be to plot the actual values and overlap the values that the model would generate, in order to compare both lines.
However, my predict
method only gives me ten values.
If I set:
plt.plot(stepwise_model.predict(0,len(data)),color='g')
It gives me an error saying that
raise ValueError('Prediction must have `end` after `start`.')
How can I do this?
Maybe there is another method than using predict
to plot the correct values?