:2ָƽ㷨Ԥʱ

ʽ:
[y,x]=ForecastExpSmooth2(x0,n,a,b,onea,oneb)
[y,x]=ForecastExpSmooth2(x0,n,a,b,onea)
[y,x]=ForecastExpSmooth2(x0,n,a,b)
[y,x]=ForecastExpSmooth2(x0,n,a)
[y,x]=ForecastExpSmooth2(x0,n)
[y,x]=ForecastExpSmooth2(x0)

x0:ԭʼʱо
n:صʱи,ݴСָxԪظ,ĬnΪx0Ԫظ
a:ϵ,ĬΪ0.5
b:ϵ,ĬΪ0.5
onea:aӦϵ,ĬΪ1
oneb:bӦϵ,ĬΪ1

ԭ:
1 y(1)=x0(1)

2 temp=x0(2)-x0(1)

3 i=2,3,
3.1 y(i)=a*x0(i)+(onea-a)*(y(i-1)+temp)
3.2 temp=b*(s(i)-s(i-1))+(oneb-b)*temp

4x(i)=x0(i),in ; x(i)=y(n)+(i-n)*temp,i>n

ο:{Exponential Smoothing<https://en.wikipedia.org/wiki/Exponential_smoothing>}