I get a 'LU decomposition' error where using SARIMAX in the statsmodels python package. This is the code:
from statsmodels.tsa.statespace.sarimax import SARIMAX
model = SARIMAX(endog=series, order=(0,0,1), seasonal_order=(1,0,1,12), trend='n')
model_fit = model.fit()
predictions = model_fit.predict(len(series), len(series)+30)
The error I get is: 'LinAlgError: LU decomposition error'. The error appears only for certain combination of numbers in 'order' and 'seasonal_order'.
model = SARIMAX(endog=series, order=(0,0,1), seasonal_order=(1,0,1,12), trend='n', enforce_stationarity=False)
Do not enforce stationarity so that your model can still fit on non-stationary data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With