(Feb-01-2019, 03:09 AM)micseydel Wrote: What have you tried? What exactly are you having trouble with?
Hi Mr
i have used the predefined function in python such as:
plot_acf(col, ax=pyplot.gca(), lags=1500) to select p value order AR
plot_pacf(col, ax=pyplot.gca(), lags=1500) to select q value order MA
after analyzing these plot i deducted that my model has (0,0,367) as order.
i am trying to build ARIMA mode in python
here is the code
def arima_Model_Static_PlotErrorAC_PAC(series, arima_order):
train, expctd =series , series
model = ARIMA(series, order=arima_order)
results_MA = model.fit(disp=-1)
yhatList=results_MA.fittedvalues
residuals = [expctd[i] - yhatList[i] for i in range(len(expctd))]
mse = mean_squared_error(expctd, yhatList)
rmse = sqrt(mse)
print(results_MA.summary())
print(rmse)
i called this function as follow:
series=DataSetDiff
arima_order=(0,0,367)
outputResidualError=arima_Model_Static_PlotErrorAC_PAC(series, arima_order)
i am gettigng the following error:
raise ValueError("The computed initial MA coefficients are not "
ValueError: The computed initial MA coefficients are not invertible
You should induce invertibility, choose a different model order, or you can
pass your own start_params
Notes: when i try the order(0,0,31) my model is well run but any value greater then 32 i am getting the above mentioned error.
any help will be appreciate.
thank you a lot
(Feb-01-2019, 03:09 AM)micseydel Wrote: What have you tried? What exactly are you having trouble with?
Hi Mr
i have used the predefined function in python such as:
plot_acf(col, ax=pyplot.gca(), lags=1500) to select p value order AR
plot_pacf(col, ax=pyplot.gca(), lags=1500) to select q value order MA
after analyzing these plot i deducted that my model has (0,0,367) as order.
i am trying to build ARIMA mode in python
here is the code
def arima_Model_Static_PlotErrorAC_PAC(series, arima_order):
train, expctd =series , series
model = ARIMA(series, order=arima_order)
results_MA = model.fit(disp=-1)
yhatList=results_MA.fittedvalues
residuals = [expctd[i] - yhatList[i] for i in range(len(expctd))]
mse = mean_squared_error(expctd, yhatList)
rmse = sqrt(mse)
print(results_MA.summary())
print(rmse)
i called this function as follow:
series=DataSetDiff
arima_order=(0,0,367)
outputResidualError=arima_Model_Static_PlotErrorAC_PAC(series, arima_order)
i am gettigng the following error:
Error:
raise ValueError("The computed initial MA coefficients are not "
ValueError: The computed initial MA coefficients are not invertible
You should induce invertibility, choose a different model order, or you can
pass your own start_params
Notes: when i try the order(0,0,31) my model is well run but any value greater then 32 i am getting the above mentioned error.
any help will be appreciate.
thank you a lot