| benchmark | R Documentation | 
benchmark is a generic function for benchmarking results based on particular metrics.
The function invokes particular methods which
depend on the class of the first argument.
benchmark(obj, ...)
## S3 method for class 'tspred'
benchmark(obj, bmrk_objs, rank.by = c("MSE"), ...)
| obj | An object of class  | 
| ... | Ignored | 
| bmrk_objs | A list of objects of class  | 
| rank.by | A vector of the given names of the metrics that should base the ranking. | 
The function benchmark.tspred benchmarks a time series prediction process
defined by a tspred object based on a particular metric. The metrics resulting
from its execution are compared against the ones produced by other time series prediction
processes (defined in a list of tspred objects).
A list containing:
| rank | A data.frame with the ranking of metrics computed for the benchmarked  | 
| ranked_tspred_objs | A list of the benchmarked  | 
Rebecca Pontes Salles
[tspred()] for defining a particular time series prediction process.
#Obtaining objects of the processing class
proc1 <- subsetting(test_len=20)
proc2 <- BoxCoxT(lambda=NULL)
proc3 <- WT(level=1, filter="bl14")
#Obtaining objects of the modeling class
modl1 <- ARIMA()
#Obtaining objects of the evaluating class
eval1 <- MSE_eval()
eval2 <- MAPE_eval()
#Defining a time series prediction process
tspred_1 <- tspred(subsetting=proc1,
                   processing=list(BCT=proc2,
                                   WT=proc3),
                   modeling=modl1,
                   evaluating=list(MSE=eval1,
                                   MAPE=eval2)
                  )
summary(tspred_1)
#Obtaining objects of the processing class
proc4 <- SW(window_len = 6)
proc5 <- MinMax()
#Obtaining objects of the modeling class
modl2 <- NNET(size=5,sw=proc4,proc=list(MM=proc5))
#Defining a time series prediction process
tspred_2 <- tspred(subsetting=proc1,
                   processing=list(BCT=proc2,
                                   WT=proc3),
                   modeling=modl2,
                   evaluating=list(MSE=eval1,
                                   MAPE=eval2)
                  )
summary(tspred_2)
data("CATS")
data <- CATS[3]
tspred_1_run <- workflow(tspred_1,data=data,prep_test=TRUE,onestep=TRUE)
tspred_2_run <- workflow(tspred_2,data=data,prep_test=TRUE,onestep=TRUE)
b <- benchmark(tspred_1_run,list(tspred_2_run),rank.by=c("MSE"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.