Autoregressive Models | Auto Regression | Machine Learning for Beginners | Edureka

edureka!
4 Jan 202208:46

Summary

TLDRThis Edureka video introduces autoregressive models for time series forecasting, explaining the concept, types, and stationarity requirement. It covers how to select the model based on PACF plots and uses cases, including market analysis and seasonal pattern prediction, emphasizing the importance of simplicity in model selection.

Takeaways

  • 📈 Auto regressive models are flexible for handling various time series patterns.
  • 📚 The script introduces the concept of time series forecasting and the importance of stationarity in data for effective modeling.
  • 🔱 Time series data is a sequence of data points collected at regular time intervals, such as years, months, or minutes.
  • 📉 Forecasting uses historical data to predict future trends, with notations like \( y_t \), \( \phi \), \( c \), and \( \eta \) representing different elements in the time series.
  • 🔄 Auto regression is a self-referential prediction method that uses only historical data of the same variable to make predictions.
  • đŸš« A key constraint for using auto regression is that the time series data must be stationary, meaning its statistical properties remain constant over time.
  • 📊 Different types of autoregressive models (AR1, AR2, etc.) are determined by the number of previous time steps considered in the prediction.
  • 📝 To select the appropriate autoregressive model, the script suggests using a PACF (Partial Autocorrelation Function) plot to identify significant lag values.
  • 📉 The PACF plot helps in determining the partial correlation between a given time point and its lags, aiding in the selection of model parameters.
  • 💡 Auto regression has various use cases, including detecting lack of randomness in data, predicting future changes, and analyzing market trends like the stock market.
  • 📚 The video concludes by encouraging viewers to engage with the content, ask questions, and explore more educational material on the Edureka channel.

Q & A

  • What is the main focus of the video on auto regressive models?

    -The video focuses on explaining auto regressive models, starting with basic concepts like time series and forecasting, moving on to defining auto regression and stationarity, discussing different types of autoregressive models, how to select the appropriate model, and concluding with various use cases of AR models.

  • What is a time series in the context of mathematics?

    -A time series is a sequence of data points recorded at successive, equally spaced points in time. It represents discrete time data and can be measured in various intervals such as years, months, hours, or minutes.

  • How does forecasting relate to time series data?

    -Forecasting is a technique that utilizes historical time series data as inputs to make informed predictions about future trends. It helps in determining the direction of future movements based on past patterns.

  • What are the common notations used in time series data?

    -Common notations include 't' for the time index, 'y_t' for the value of the series at time 't', 'φ' (phi) for the coefficient of each value of 'y_t', 'c' for the constant term or bias of the model, and 'η' (eta) for the error in the forecast at time 't'.

  • What is meant by auto regression in the context of time series models?

    -Auto regression refers to a time series model that uses previous time steps' observations as inputs to predict the same characteristic at the next time step. It is based on the concept of predicting a numeric value based on its own historical data.

  • Why is stationarity important for using auto regressive models?

    -Stationarity is important because it ensures that the statistical properties of the time series data, such as mean and variance, remain constant over time. This allows for more accurate and reliable predictions using auto regressive models.

  • What does the term 'AR' stand for in the context of time series models?

    -In the context of time series models, 'AR' stands for AutoRegressive, which is a model that uses past values of a time series to predict future values.

  • How do you determine the number of lag values to consider in an autoregressive model?

    -The number of lag values to consider can be determined using a PACF (Partial AutoCorrelation Function) plot. It helps identify the significant lags by looking at the points where the PACF values fall below a certain threshold, typically a magnitude of 0.05.

  • What is the purpose of the constant term 'c' in an autoregressive model?

    -The constant term 'c' in an autoregressive model serves as the bias or the baseline value around which the predictions are made, adjusting the forecast according to the historical data's average level.

  • Can you provide an example of a use case for autoregressive models?

    -Autoregressive models are used in various fields such as predicting stock market trends, analyzing recurring or seasonal patterns in data, and detecting lack of randomness in data sequences.

Outlines

00:00

📈 Introduction to Autoregressive Models

This paragraph introduces the concept of autoregressive models in the context of time series forecasting. Kavya from Edureka explains the agenda of the video, which includes an overview of time series, the definition of auto regression and stationarity, the types of autoregressive models, how to select the appropriate model, and their use cases. The importance of stationarity for time series data is emphasized, and the basic notation used in time series analysis is defined. Autoregression is described as a model that uses previous observations to predict future values, with a simple regression equation provided as an example.

05:00

🔍 Choosing the Right Autoregressive Model

The second paragraph delves into the specifics of selecting the right autoregressive model by considering the number of lag values to include. It explains that a simple model with the least number of parameters is preferred, and introduces the Partial Autocorrelation Function (PACF) plot as a tool for determining significant lag values. The process of creating a derived chart for profit data and using the PACF plot to identify relevant lags is illustrated with an example. The paragraph concludes with examples of use cases for autoregression, such as detecting lack of randomness in data, predicting future changes, market analysis, and forecasting seasonal patterns.

Mindmap

Keywords

💡Time Series

A time series is a sequence of data points measured at successive points in time, typically at uniform intervals. In the video, time series refers to the structured data set that is used for forecasting future values, such as predicting profits over years or analyzing weather patterns. The concept is central to understanding how auto-regressive models function, as they rely on past values within a time series to make predictions.

💡Forecasting

Forecasting is the process of making predictions about future trends based on historical data. In the context of the video, forecasting is a key application of time series analysis, where the goal is to predict future values using models like autoregression. This is essential for planning and decision-making in various fields, such as finance and weather prediction.

💡Autoregression

Autoregression is a type of statistical model used in time series analysis where the current value of a series is predicted based on its past values. The video emphasizes that autoregression involves using previous data points from the same series to forecast future values, making it a powerful tool for time series forecasting. The term combines 'auto,' meaning 'self,' and 'regression,' which refers to predicting a numeric value.

💡Stationarity

Stationarity refers to a characteristic of a time series where its statistical properties, such as mean and variance, remain constant over time. In the video, stationarity is a necessary condition for applying autoregressive models, as non-stationary data can lead to unreliable predictions. The video explains how to identify stationary data by checking for consistent patterns over time without trends or seasonal effects.

💡AR Model

An AR (Autoregressive) model is a type of time series model that uses its own previous values to predict future values. The video discusses different types of AR models, such as AR(1) and AR(2), which differ based on how many past values are used in the prediction. The choice of the AR model depends on the data and the desired simplicity of the model.

💡Lag

Lag refers to the delay between a current data point and a previous one within a time series. In autoregressive models, lag values are the previous data points used to predict the current value. The video explains that choosing the appropriate lag values is crucial for building an effective AR model, as it determines how much past information is considered in the forecast.

💡PACF Plot

A PACF (Partial Autocorrelation Function) plot is a graphical tool used to identify the significant lags in a time series for building an AR model. The video describes how PACF plots help in determining which past values (lags) have the strongest relationship with the current value, guiding the selection of the most important lags to include in the model.

💡Coefficient (Phi)

The coefficient, denoted by the Greek letter phi (φ), represents the weight or impact of a past value (lag) on the current value in an autoregressive model. The video explains that each lag in an AR model has a corresponding coefficient that multiplies the lagged value, influencing the final prediction. These coefficients are crucial for understanding how much past data influences future outcomes.

💡Error Term (Eta)

The error term, denoted by the Greek letter eta (η), represents the difference between the actual value and the predicted value in an autoregressive model. The video highlights that every AR model includes an error term, which accounts for the unpredictable components of the data that are not captured by the model. This term is essential for assessing the accuracy and reliability of the model's predictions.

💡Use Cases of Autoregression

The video outlines various use cases of autoregression, emphasizing its application in predicting future trends, analyzing market data, and identifying patterns in time series. Examples include forecasting stock market trends and detecting seasonal patterns in sales data. Understanding these use cases helps viewers grasp the practical significance of autoregressive models in real-world scenarios.

Highlights

Auto regressive models are introduced as flexible for handling various time series patterns.

Agenda includes time series and forecasting, auto regression, stationarity, types of autoregressive models, model selection, and use cases of AR.

Time series is defined as a sequence of discrete time data taken at equally spaced points in time.

Forecasting is explained as using historical data to make predictive estimates for future trends.

Time series data notations are introduced, including index 't', series values 'y_t', coefficients 'φ', constant 'c', and forecast error 'η'.

Auto regression is defined as a time series model using previous time steps' observations to predict future characteristics.

Stationarity in time series is the condition where statistical properties remain constant over time without trends or changing variance.

Different types of autoregressive models (AR1, AR2, etc.) are based on the number of previous values considered for prediction.

The simplest model with the least number of parameters is preferred in auto regression.

PACF plot is used to determine the lag values to consider in the model, based on partial autocorrelation.

A practical example of using PACF plot for selecting significant lags in a profit time series is provided.

Auto regression can identify lack of randomness in data through its auto correlation-based model.

Primary use case of auto regression is predicting future changes using time series indexing.

Auto regression is commonly used in market analysis, such as the stock market, to forecast trends.

The model can also forecast recurring or seasonal patterns in data.

The video concludes with an invitation for viewers to subscribe, like, and comment for further learning.

Transcripts

play00:01

[Music]

play00:07

auto regressive models are remarkably

play00:09

flexible at handling a wide range of

play00:11

different time series patterns hi guys

play00:14

this is kavya from edureka welcome to

play00:16

this video on auto regressive models at

play00:19

first let's have a look at the agenda

play00:21

we'll start with time series and

play00:23

forecasting and then we'll see what is

play00:25

auto regression and what is stationarity

play00:28

we'll have a look at the types of

play00:30

autoregressive models and followed by

play00:32

how to pick the autoregressive model

play00:34

we'll conclude the session with the use

play00:37

cases of ar

play00:38

but before we get started make sure you

play00:40

subscribe to edirect youtube channel and

play00:42

hit the bell icon to never miss an

play00:44

update also if you are interested in

play00:46

online training certification do check

play00:48

out the link given in the description

play00:50

now let's go ahead and have a brief

play00:52

introduction to time series and

play00:54

forecasting in mathematics a time series

play00:57

is a sequence taken at a successively

play00:59

equally spaced points in time

play01:01

thus it is a sequence of discrete time

play01:04

data

play01:04

the time can be of any order such as in

play01:06

terms of years months hours or minutes

play01:09

for example analyzing profits in a

play01:11

company over many years would be an

play01:13

example of time series or checking the

play01:15

weather at different time stamps can

play01:17

also be a time series however checking

play01:20

the temperature over different matrix

play01:22

such as city or latitude will not be an

play01:25

example of time series so using suitable

play01:28

time series forecasts can be made

play01:31

forecasting is a technique that uses

play01:33

historical data as inputs to make

play01:35

informed estimates that are predictive

play01:37

in determining the direction of future

play01:39

trends

play01:40

there are various notations used in time

play01:42

series data the alphabet t taking

play01:45

numeric values such as 1 2 3 etc is the

play01:48

index denoting the particular time

play01:50

period

play01:51

y t would be the series of n values

play01:53

corresponding to each time index d the

play01:56

greek alphabet phi denotes the

play01:58

coefficient for each value of y t

play02:01

c is a constant term denoting the bias

play02:04

of the model and eta denotes the error

play02:07

in forecast in time t given the actual

play02:09

value y t minus the forecasted value f d

play02:14

having familiarity with time series and

play02:16

the notations now let's have a look at

play02:18

what auto regression is

play02:20

the term auto regression is composed of

play02:22

two terms auto and regression

play02:25

the term regression refers to the

play02:26

prediction of some numeric value this

play02:29

value can be of any scale and still be

play02:31

regressive

play02:32

and auto here means self that is

play02:35

prediction of numeric value based on its

play02:38

own previous cells

play02:40

no other factors are taken into

play02:42

consideration except for its own

play02:44

historical data consider this example

play02:47

here the price of an object is

play02:48

determined based on the date the

play02:51

predictions are only based on its own

play02:53

older values thus we can say that auto

play02:56

regression is a time series model that

play02:58

uses observations from previous time

play03:00

steps as inputs to predict the same

play03:03

characteristics at the next time step

play03:05

to calculate the value at time step t

play03:08

for value y the regression equation

play03:11

looks like this where y d is the value

play03:13

at time t

play03:14

c is the constant phi is the coefficient

play03:17

to each of the previous time stem values

play03:20

and eta is the error term of the

play03:22

equation a constraint to using

play03:24

autoregression is that the time series

play03:27

data needs to be stationary so now let's

play03:29

have a look at what do we mean by

play03:31

stationarity time series data is said to

play03:34

be stationary if the statistical

play03:36

properties do not change over time

play03:38

it is supposed to show an inclining or

play03:40

declining overall trend so the mean and

play03:43

variance should remain constant over

play03:45

different slices in the data

play03:47

also a time series with seasonal

play03:50

patterns with no clear trend is not

play03:52

stationary

play03:53

for example this data depicts incline in

play03:56

some months and decline in some others

play03:58

forming a seasonal pattern hence it is

play04:01

not stationary however this data is

play04:04

showing a clear inclining trend so it is

play04:07

an example of stationary data so guys

play04:10

when we know that the data is stationary

play04:12

we can proceed with auto regression now

play04:15

let's have a look at the various kinds

play04:17

of autoregressive models

play04:19

when i talk about the types of

play04:20

autoregressive models i mean the number

play04:22

of previous values to take into account

play04:25

let's see in this example we have data

play04:27

till 2020 for profit and we want to find

play04:30

the profit for the coming year that is

play04:32

2021. the type of ar model will

play04:35

determine which of the date from the

play04:37

previous years we will take into

play04:39

consideration

play04:40

ar1 will only take one previous year's

play04:43

data point into consideration the

play04:45

equation shows that to determine yt we

play04:48

are only taking the value of y of t

play04:50

minus 1 along with its coefficient phi

play04:53

constant c and error term eta similarly

play04:57

ar2 takes both the data of t minus 1 and

play05:00

t minus 2 to predict y t

play05:03

note that in the equation there's always

play05:05

one constant and one error term but the

play05:08

number of coefficients of older values

play05:10

depends on the type of autoregressive

play05:12

model we take

play05:14

the number of previous values is not

play05:16

limited to one or two it can be any p

play05:19

values taken into consideration

play05:21

accordingly the equation will contain p

play05:24

coefficients 2.

play05:25

now that we know about the kinds of

play05:27

autoregressive models let's find out how

play05:30

to pick the number of lag values to

play05:32

consider

play05:33

you might think that it's obvious to

play05:34

consider all the previous data points to

play05:36

build a model however the rule of auto

play05:39

regression is to make the simplest model

play05:42

with least number of parameters

play05:44

to determine which lag values to take we

play05:47

can consider something known as a pacf

play05:49

plot

play05:50

pacf stands for partial autocorrelation

play05:53

function as explanatory with the name it

play05:56

determines the partial correlation

play05:58

between a given point and its lag or

play06:00

previous value we can only take into

play06:03

account those parameters for which the

play06:05

lag is higher than the threshold value

play06:08

consider this plot

play06:10

the data points corresponding to each

play06:12

year looks like this we have profit for

play06:14

each year

play06:16

from this data we need to make a derived

play06:18

chart where we will take the difference

play06:20

in profit between that year and two

play06:22

years before so lag will be equal to 2

play06:25

and we will find the value of y of t

play06:28

minus y of t minus 2 thus lag of 2020

play06:32

will be profit of 2020 which is 82 minus

play06:35

profit of 2018 which is 93 that is equal

play06:39

to minus 11.

play06:40

lag of 2018 will be profit in 2018 minus

play06:44

profit in 2016 which is 93 minus 94

play06:48

equals minus 1 and so on

play06:51

for this data we make a pacf plot taking

play06:54

threshold as magnitude of 10.

play06:57

from this plot we see that the profit

play06:59

lag for the years 2014 and 2018 is below

play07:02

the magnitude of 10. thus we will only

play07:05

take the points of yt with t equals 2012

play07:09

2016 and 2020.

play07:12

the equation for this function will be

play07:13

the forecasted value for 2021

play07:16

equals constant c plus phi into y of

play07:19

2012 plus phi into y of 2016 plus phi

play07:23

into y of 2020 plus the error term eta

play07:27

this is the simplest equation of auto

play07:29

regression to forecast the time series

play07:32

taking only the significant lags

play07:34

finally let's have a look at some of the

play07:37

use cases of auto regression the model

play07:40

of auto regression is based on auto

play07:42

correlation thus auto regression can

play07:44

help us find if there is a lack of

play07:46

randomness in the data

play07:48

secondly as we have seen the primary use

play07:52

case of autoregression is to predict

play07:54

future changes using time series

play07:56

indexing

play07:57

auto regression is also commonly used to

play08:00

analyze markets such as stock market

play08:03

it can also forecast any kind of

play08:05

recurring or seasonal pattern in the

play08:07

data

play08:08

i hope you enjoyed the session thank you

play08:10

for watching this video if you have any

play08:12

doubts please leave a message in the

play08:14

comment section happy learning

play08:17

i hope you have enjoyed listening to

play08:18

this video please be kind enough to like

play08:21

it and you can comment any of your

play08:23

doubts and queries and we will reply

play08:26

them at the earliest do look out for

play08:28

more videos in our playlist and

play08:30

subscribe to edureka channel to learn

play08:32

more happy learning

play08:45

you

Rate This
★
★
★
★
★

5.0 / 5 (0 votes)

Étiquettes Connexes
Time SeriesForecastingAuto RegressionStationarityAR ModelsStatistical AnalysisPredictive ModellingData PatternsFinancial AnalysisMarket Trends
Besoin d'un résumé en anglais ?