I try to fit Autoregression by sm.tsa.statespace.SARIMAX. But I meet a warning, then I want to set frequency information for this model. Who used to meet it, can you help me ?
fit1 = sm.tsa.statespace.SARIMAX(train.Demand, order=(1, 0, 0),
enforce_stationarity=False,
enforce_invertibility=False).fit()
y_hat['AR'] = fit1.predict(start="1975-01-01", end="1975-12-01", dynamic=True)
plt.figure(figsize=(16,8))
plt.plot( train['Demand'], label='Train')
plt.plot(test['Demand'], label='Test')
plt.plot(y_hat_avg['AR'], label='AR')
plt.legend(loc='best')
plt.show()
C:\Users\thach.le\Anaconda3\lib\site-packages\statsmodels-0.8.0-py3.6-win-
amd64.egg\statsmodels\tsa\base\tsa_model.py:165: ValueWarning: No frequency
information was provided, so inferred frequency MS will be used.
% freq, ValueWarning)
Thanks
pandas
DataFrame
to thestatsmodels
function. – Lorientfrom statsmodels.tools.sm_exceptions import ValueWarning
warnings.simplefilter('ignore', ValueWarning)
– Puma