ES.grid | R Documentation |
Grid search for exponential smoothing to find optimal parameters that minimizes errors with respect to a certain test set. Only implemented for non-seasonal exponential smoothing
ES.grid(type, alphrange, betarange, nahead, trainset, testset)
type |
Type of moving average. Can be |
alphrange |
A vector of parameters for the level component. Can be created using |
betarange |
A vector of parameters for the trend component. Can be created using |
nahead |
Number of observations to forecast. |
trainset |
A set of univariate time series data. Can be a vector (type double) or a data.table. |
testset |
Same as above. |
A data.table containing all combinations of alpha and beta with their respective MSE and MAPE values.
ES.Grid(type="SES", alphrange=seq(0.01,1,0.01), betarange=NA, nahead=12, crudenow$Close, crudetest$Close) ES.Grid(type="DES", alphrange=seq(0.1,1,0.1), betarange=seq(0.1,1,0.1), nahead=12, crudenow$Close, crudetest$Close)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.