↑ ↓ Navigate ↡ Select ESC Close

Autoregressive Process - Applied Time Series Analysis in Python and TensorFlow

2021-03-07 Science & Technology
2.3k
39
3

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

πŸ‘‰ Get the course at 87% off: https://www.udemy.com/course/applied-time-series-analysis-in-python/?couponCode=TSPYTHON2021 πŸ“š Link to the notebook: https://github.com/marcopeix/AppliedTimeSeriesAnalysisWithPython/blob/main/HOTSAP_AR.ipynb πŸ“š Link to the dataset: https://github.com/marcopeix/AppliedTimeSeriesAnalysisWithPython/tree/main/data Email me for a coupon if the one above expired: [email protected] ----------------------------------- Now, let’s cover the autoregressive model.The autoregressive model uses a linear combination of past values of the target to make a prediction. Since we are talking about autoregression, the regression is made against the target itself. We refer to the autoregressive model as the AR(p) model, where p is the order.The AR(p) model is very flexible in the sense that it can model many different types of time series patterns. However, keep in mind that the autoregressive model can only be applied to stationary time series, which will constrain the range of the parameters phi. If we look at the ACF plot, we see some oscillation, as well as a slow decay. This is a hint that it is not a moving average process, and so an autoregressive process must be in play. Now, when we look at the PACF, the partial autocorrelation function plot, then we see that there is no significant peak after lag 2. Therefore, the PACF can be used to determine the order of the AR model.As a side note, the PACF or partial autocorrelation function finds the correlation between the present value and the residuals at a previous lag. Therefore, it finds a correlation that cannot be explained with the ACF. To recap, if you plot the ACF and you see a decay or a sinusoidal pattern, then it suggests an autoregressive process.Plotting the PACF will allow you to estimate the order of the AR model. In this case, we saw that it is of order 2, since after lag 2, the coefficients are not significant.

Top Comments (2)

@piercelee534 2024-11-16

There is an error in the video: the ar2 should be [1, -0.33, -0.5]. A minus sign is needed.

0 1 replies
@TheSerbes 2024-07-26

I will be making an hourly passenger count forecast using LSTM time series model with 6-7 parameters. Can I choose the parameters as you did here?

0

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan β€’ All features unlocked

App screenshot