TBATS for Time Series Data
광범위한 계절 패턴 변동
과 관련된 문제를 극복하고 상관성이 있는 오차
를 처리하기 위해 지수 평활(Exponential Smoothing)
을 사용한 수정된 상태공간 모형으로 De Livera et al. (2011)이 제안하였다.복잡한 계절성
을 가진 시계열 데이터를 분석하는 데 유용하다.
forecast
package에 있는 tbats()
를 이용하여 모형을 적합시킬 수 있다. 자세한 옵션은 여기를 참조한다.tbats(
y,
use.box.cox = NULL,
use.trend = NULL,
use.damped.trend = NULL,
seasonal.periods = NULL,
use.arma.errors = TRUE,
use.parallel = length(y) > 1000,
num.cores = 2,
bc.lower = 0,
bc.upper = 1,
biasadj = FALSE,
model = NULL,
...
)
cl <- parallel::makeCluster(detectCores(), setup_timeout = 0.5)
TBATS.fit <- train.ts %>%
tbats(use.box.cox = FALSE,
use.trend = TRUE,
use.damped.trend = TRUE,
use.parallel = TRUE,
num.cores = cl)
summary(TBATS.fit)
Length Class Mode
lambda 0 -none- NULL
alpha 1 -none- numeric
beta 1 -none- numeric
damping.parameter 1 -none- numeric
gamma.one.values 1 -none- numeric
gamma.two.values 1 -none- numeric
ar.coefficients 0 -none- NULL
ma.coefficients 0 -none- NULL
likelihood 1 -none- numeric
optim.return.code 1 -none- numeric
variance 1 -none- numeric
AIC 1 -none- numeric
parameters 2 -none- list
seed.states 12 -none- numeric
fitted.values 123 ts numeric
errors 123 ts numeric
x 1476 -none- numeric
seasonal.periods 1 -none- numeric
k.vector 1 -none- numeric
y 123 ts numeric
p 1 -none- numeric
q 1 -none- numeric
call 7 -none- call
series 1 -none- character
method 1 -none- character
TBATS.forecast <- forecast(TBATS.fit, h=n.test)
TBATS.forecast$mean
Jan Feb Mar Apr May Jun Jul
2001 1978.995 2028.484 1959.201 2089.790
2002 1721.923 1658.583 1979.689 1966.634 2018.589 1951.281 2083.449
2003 1720.255 1657.248 1978.620 1965.779 2017.904 1950.732 2083.010
2004 1720.140 1657.155 1978.546
Aug Sep Oct Nov Dec
2001 2116.995 1814.845 1914.140 1924.798 1938.481
2002 2111.919 1810.782 1910.888 1922.195 1936.397
2003 2111.568 1810.501 1910.663 1922.015 1936.252
2004
plot(TBATS.forecast)
accuracy(c(TBATS.forecast$mean), test.ts)
ME RMSE MAE MPE MAPE ACF1
Test set 69.36452 103.114 88.31896 3.379683 4.42057 0.556916
Theil's U
Test set 0.5999032
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".