当前位置:网站首页>Time series ARIMA model
Time series ARIMA model
2022-07-27 16:15:00 【Carrot eating crocodile】
Data stationarity and difference method
Stability :
- Stationarity is the fitting curve obtained through the sample time series In the future, we can still follow the existing form “ inertia ” Underground continuation
- Stationarity requires that the mean and variance of the sequence do not change significantly
Strict stability and weak stability :
- Yan pingwen : The distribution of strict stationary representation does not change with time . Such as : White noise ( normal ), No matter how you take , It's all about expectations 0, The variance of 1
- Weakly stationary : Expectation and correlation coefficient ( Dependence ) unchanged At some point in the future t Value Xt It depends on its past information , So we need dependence
The difference method : Time series in t and t-1 Time difference

Autoregressive model (AR)
- Describe the relationship between current value and historical value , Use the historical time data of variables to predict themselves
- Autoregressive model must satisfy the requirement of stationarity
- p The formula definition of order autoregressive process : y t = μ + ∑ i = 1 p γ i y t − 1 + ϵ t y_{t}=\mu+\sum^{p}_{i=1}\gamma_{i}y_{t-1}+\epsilon_{t} yt=μ+∑i=1pγiyt−1+ϵt
- y t y_{t} yt It's the current value μ \mu μ It's a constant term , P P P It's order γ i {\gamma}_{i} γi It's an autocorrelation function ϵ t {\epsilon}_{t} ϵt It's error
Limitations of autoregressive models
- Autoregressive model uses its own data to predict
- Must be stable
- Must have autocorrelation , If the autocorrelation coefficient (φi) Less than 0.5, ... should not be used
- Autoregression is only applicable to predict the phenomenon related to its own early stage
Moving average model (MA)
- Moving average model focuses on the accumulation of error terms in autoregressive model
- q The formula definition of order autoregressive process : y t = μ + ϵ t + ∑ i = 1 q θ i ϵ t − 1 y_{t}=\mu+\epsilon_{t}+\sum^{q}_{i=1}\theta_{i}\epsilon_{t-1} yt=μ+ϵt+∑i=1qθiϵt−1
- The moving average method can effectively eliminate the random fluctuation in prediction
Autoregressive moving average model (ARMA)
- The combination of autoregressive and moving average
- Formula definition : y t = μ + ∑ i = 1 p γ i y t − 1 + ϵ t + ∑ i = 1 q θ i ϵ t − 1 y_{t}=\mu+\sum^{p}_{i=1}\gamma_{i}y_{t-1}+\epsilon_{t}+\sum^{q}_{i=1}\theta_{i}\epsilon_{t-1} yt=μ+∑i=1pγiyt−1+ϵt+∑i=1qθiϵt−1
ARIMA
- ARIMA(p,d,q) The model is called differential autoregressive moving average model (Autoregressive Integrated Moving Average Model, Brief notes ARIMA
- AR It's autoregression , p Is the autoregressive term ; MA For moving average q Is the moving average number of items ,d It is the difference number of times when the time series becomes stationary
- principle : The non-stationary time series is transformed into stationary time series, and then the dependent variable The model established by regressing only its lag value and the present value and lag value of random error term
Autocorrelation function ACF(autocorrelation function)
- An ordered sequence of random variables is compared to itself The autocorrelation function reflects the correlation between the values of the same sequence in different sequences
- The formula : A C F ( k ) = ρ k = C o v ( y t , y t − k ) V a r ( y t ) ACF(k)=\rho_{k}=\frac{Cov(y_{t},y_{t-k})}{Var(y_{t})} ACF(k)=ρk=Var(yt)Cov(yt,yt−k)
- ρ k \rho_{k} ρk The value range of is [-1,1]
Partial autocorrelation function (PACF)(partial autocorrelation funtion)
- For a smooth AR§ Model , Find the lag k Autocorrelation coefficient p(k) when In fact, it's not x(t) And x(t-k) A simple correlation between
- x(t) At the same time, it will suffer from the middle k-1 Random variables x(t-1)、x(t-2)、……、x(t-k+1) Influence And this k-1 All random variables and x(t-k) There is a correlation So the autocorrelation coefficient p(k) It's actually adulterated with other variables x(t) And x(t-k) Influence
- Cut out the middle k-1 Random variables x(t-1)、x(t-2)、……、x(t-k+1) After the interference of x(t-k) Yes x(t) The relevance of the impact .
- ACF It also includes the effects of other variables The partial autocorrelation coefficient PACF Is strictly the correlation between these two variables
ARIMA(p,d,q) Order determination :

truncation : Fall within the confidence interval (95% All of the points conform to the rule )
ARIMA Modeling process :
- Smooth the sequence ( Determination by difference method d)
- p and q Order determination :ACF And PACF
- ARIMA(p,d,q)
ARIMA example ( be based on python Realization )
Model selection AIC And BIC: Choose a simpler model
- AIC: Red pool information criterion (Akaike Information Criterion,AIC)
??? = 2? − 2ln(?) - BIC: Bayesian information rule (Bayesian Information Criterion,BIC)
??? = ??? ? − 2ln(?) - k There are several parameters in the model ,n Is the number of samples ,L Is the likelihood function
Model residual test :
- ARIMA Whether the residual error of the model is the average value 0 And the variance is a constant normal distribution
- QQ chart : Linear or normal distribution
Model selection and residual examples
边栏推荐
猜你喜欢

: 0xC0000005: 写入位置 0x01458000 时发生访问冲突----待解

Mapreduce实例(三):数据去重

新版jmeter函数助手不在选项菜单下-在工具栏中
![[sword finger offer] interview question 42: the maximum sum of continuous subarrays -- with 0x80000000 and int_ MIN](/img/01/bbf81cccb47b6351d7265ee4a77c55.png)
[sword finger offer] interview question 42: the maximum sum of continuous subarrays -- with 0x80000000 and int_ MIN

Openwrt adds support for SD card

JSP Foundation

Pychart import existing project

2.2 basic elements of JMeter

Content ambiguity occurs when using transform:translate()

For enterprise operation and maintenance security, use the cloud housekeeper fortress machine!
随机推荐
2.2 basic elements of JMeter
flink打包程序提交任务示例
Rare bitwise operators
C语言实现字节流与十六进制字符串的相互转换
Baidu picture copy picture address
openwrt 增加RTC(MCP7940 I2C总线)驱动详解
解决MT7620不断循环uboot(LZMA ERROR 1 - must RESET board to recover)
可载100人!马斯克发布史上最强“星际飞船” !最早明年上火星!
Personal perception of project optimization
Text capture picture (Wallpaper of Nezha's demon child coming to the world)
逗号操作符你有用过吗?
IO流简介
Short video mall system, system prompt box, confirmation box, click blank to close the pop-up box
云管平台中租户以及多租户概念简单说明
QT (VI) value and string conversion
JWT简介
: 0xC0000005: 写入位置 0x01458000 时发生访问冲突----待解
这些题~~
openwrt 编译驱动模块(在openwrt源代码外部任意位置编写代码,独立模块化编译.ko)
Mapreduce实例(一):WordCount