arima model error in python - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: arima model error in python (/thread-15587.html) |
arima model error in python - wissam1974 - Jan-23-2019 hi i am using the software PyCharm(2018.1) software to create ARIMA model in pyhthon here is the model that i have created: def arima_Model_Static_PlotErrorAC_PAC(series, arima_order): # prepare training dataset X = series # print(X) exit() train_size = int(len(X) * 0.50) # 0.50 train, test = X[0:train_size], X[train_size:] history = [x for x in train] # make predictions print(len(history)) print(history) exit() errorList=list() expected= list() predictions = list() obs = list() for t in range(len(test)): model = ARIMA(history, order=arima_order) #exit() model_fit = model.fit(disp=False, transparams=False) yhat = model_fit.forecast()[0] #model_fit.forecast()[0] exit() predictions.append(yhat) obs = test[t] history.append(obs) expected.append(obs) errorResidualExpePred = obs - yhat errorList.append(errorResidualExpePred) print('epoch=%i, predicted=%f, expected=%f' % (t, yhat, obs)) mse = mean_squared_error(test, predictions) rmse = sqrt(mse) print(model_fit.summary()) print(rmse) return errorListi called this model as follow: series=np.array(diffARIMA) #series=colDataSet arima_order=(11,0,32) outputResidualError=arima_Model_Static_PlotErrorAC_PAC(series, arima_order)also the values of p, d, q are well chosen by applying the following rules
the error that i have got when i run the model: Finally i would like to mention that if a apply my model by selecting the following arima orderarima_order=(11,0,0) arima_order=(0,0,16)my modele is well executed any help will be appreciated Thank you |