FcOptimizeAdditiveDecompositionModel: Forecasting with optimized Additive Decomposition Model...

View source: R/FcOptimizeAdditiveDecompositionModel.R

FcOptimizeAdditiveDecompositionModelR Documentation

Forecasting with optimized Additive Decomposition Model function using opm

Description

The optimization is based on L-BFGS-B for the three parameters alpha beta and gamma of FcAdditiveDecompositionModel.

Usage

FcOptimizeAdditiveDecompositionModel(Data, SeasonalLength = 52,

Horizon = 12, Iterations = 100, PlotIt = TRUE)

Arguments

Data

[1:n] numerical vector

SeasonalLength

see FcAdditiveDecompositionModel

Horizon

horizon of forecast, autmaticall splits Data into train and test set

Iterations

number of iteratons for the opm procedure, because it depends on the initial choice of AlphaBetaGamma.

PlotIt

If TRUE, time series and forecast is ploted.

Details

Limited-memory BFGS is an optimization algorithm in the family of quasi-Newton methods that approximates the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm using a limited amount of computer memory. The object function is defined by RootDeviance where MRD is minimized and the initial choice of AlphaBetaGamma is random. By selecting Iterations higher than 1 a simulated annealing procedure is used. After this procudure the optimized parameters AlphaBetaGamma can be used in FcAdditiveDecompositionModel to forecast the future.

Value

Forecast

[1:k] forecast, where Horizon=n-k

Accurary

against the test set, see accuracy

Train

[1:m] trainings data with m+k=n.

ForecastTrain

[1:m] forecast fo trainings data

Test

[1:k] testset

AlphaBetaGamma

parameters of FcAdditiveDecompositionModel

Note

The optimization of opm contrary to parameter settings sometimes tries values above 1 or less than zero. This generates warnings, but is catched in FcAdditiveDecompositionModel.

Author(s)

Michael Thrun

References

Nash JC, and Varadhan R (2011). Unifying Optimization Algorithms to Aid Software System Users: optimx for R., Journal of Statistical Software, 43(9), 1-14., URL http://www.jstatsoft.org/v43/i09/.

See Also

opm

Examples

#ToDo

Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.