Time Series with Python: Practical Introduction to Time Series Forecasting and Machine Learning Models with Python. by Smith Jim

Time Series with Python: Practical Introduction to Time Series Forecasting and Machine Learning Models with Python. by Smith Jim

Author:Smith, Jim [Smith, Jim]
Language: eng
Format: epub, pdf
Published: 2019-07-30T16:00:00+00:00


model = ARIMA(train.values, order=(5, 0, 2))

model_fit = model.fit(disp=False)

In [157]:

predictions = model_fit.predict(len(test))

test_ = pandas.DataFrame(test)

test_['predictions'] = predictions[0:1871]

In [158]:

plt.plot(df['T'])

plt.plot(test_.predictions)

plt.show()

In [167]:

error =

sqrt(metrics.mean_squared_error(test.values,predictions[0:1871]))

print ('Test RMSE for ARIMA: ', error)

Test RMSE for ARIMA: 43.21252940234892

Time Series - Variations of ARIMA

In the previous chapter, we have now seen how ARIMA model works, and its limitations that it cannot handle seasonal data or multivariate time series and hence, new models were introduced to include these features.

A glimpse of these new models is given here −

Vector Auto-Regression (VAR)

It is a generalized version of auto regression model for multivariate stationary time series. It is characterized by ‘p’ parameter.

Vector Moving Average (VMA)

It is a generalized version of moving average model for multivariate stationary time series. It is characterized by ‘q’ parameter.

Vector Auto Regression Moving Average (VARMA)

It is the combination of VAR and VMA and a generalized version of ARMA model for multivariate stationary time series. It is characterized by ‘p’ and ‘q’ parameters. Much like, ARMA is capable of acting like an AR model by setting ‘q’ parameter as 0 and as a MA model by setting ‘p’ parameter as 0, VARMA is also capable of acting like an VAR model by setting ‘q’ parameter as 0 and as a VMA model by setting ‘p’ parameter as 0.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.