Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

benchB3

Benchmarking on B3 data


Description

Evaluates the performance of a classification method on the B3 data.

Usage

benchB3(method, prior = rep(1/4, 4), sv = "4", scale = FALSE, ...)

Arguments

method

classification method to use

prior

prior probabilities of classes

sv

class of the start of a business cycle

scale

logical, whether to use scale first

...

furhter arguments passed to method

Details

The performance of classification methods on cyclic data can be measured by a special form of cross-validation: Leave-One-Cycle-Out. That means that a complete cycle is used as test data and the others are used as training data. This is repeated for all complete cycles in the data.

Value

A list with elements

MODEL

list with the model returned by method of the training data

error

vector of test error rates in cycles

l1co.error

leave-one-cycle-out error rate

Author(s)

Karsten Luebke, karsten.luebke@fom.de

See Also

Examples

perLDA <- benchB3("lda")
## Not run: 
## due to parameter optimization rda takes a while 
perRDA <- benchB3("rda")
library(rpart)
## rpart will not work with prior argument:
perRpart <- benchB3("rpart", prior = NULL)

## End(Not run)

klaR

Classification and Visualization

v0.6-15
GPL-2 | GPL-3
Authors
Christian Roever, Nils Raabe, Karsten Luebke, Uwe Ligges, Gero Szepannek, Marc Zentgraf, David Meyer
Initial release
2020-02-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.