evalfrbe: Evaluate the performance of the FRBE forecast

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/evalfrbe.R

Description

Take a FRBE forecast and compare it with real values using arbitrary error function.

Usage

1
2
3
evalfrbe(fit,
         real,
         error=c('smape', 'mase', 'rmse'))

Arguments

fit

A FRBE model of class frbe as returned by the frbe function.

real

A numeric vector of real (known) values. The vector must correspond to the values being forecasted, i.e. the length must be the same as the horizon forecasted by frbe.

error

Error measure to be computed. It can be either Symmetric Mean Absolute Percentage Error (SMAPE), Mean Absolute Scaled Error (MASE), or Root Mean Squared Error (RMSE). See smape, mase, and rmse, for more details.

Details

Take a FRBE forecast and compare it with real values by evaluating a given error measure. FRBE forecast should be made for a horizon of the same value as length of the vector of real values.

Value

Function returns a data.frame with single row and columns corresponding to the error of the individual forecasting methods that the FRBE is computed from. Additionally to this, a column "avg" is added with error of simple average of the individual forecasting methods and a column "frbe" with error of the FRBE forecasts.

Author(s)

Michal Burda

References

<c5><a0>t<c4><9b>pni<c4><8d>ka, M., Burda, M., <c5><a0>t<c4><9b>pni<c4><8d>kov<c3><a1>, L. Fuzzy Rule Base Ensemble Generated from Data by Linguistic Associations Mining. FUZZY SET SYST. 2015.

See Also

frbe, smape, mase, rmse

Examples

1
2
3
4
5
6
7
  # prepare data (from the forecast package)
  library(forecast)
  horizon <- 10
  train <- wineind[-1 * (length(wineind)-horizon+1):length(wineind)]
  test <- wineind[(length(wineind)-horizon+1):length(wineind)]
  f <- frbe(ts(train, frequency=frequency(wineind)), h=horizon)
  evalfrbe(f, test)

lfl documentation built on May 29, 2017, 10:53 a.m.