tunePareto.occ: Ordinal Classifier Cascade Tune Pareto Object

Description Usage Arguments Details Value Examples

View source: R/tunePareto.occ.R

Description

TunePareto wrapper for the ordinal classifier cascade.

Usage

1
tunePareto.occ(base.classifier)

Arguments

base.classifier

A predefined TuneParetoClassifier object used as binary classifier for the ordinal classifier cascade. There exist five classifier types that can be used: tunePareto.knn(), tunePareto.svm(), tunePareto.tree(), tunePareto.randomForest(), tunePareto.NaiveBayes(). For more information about these classifier functions please refer to the corresponding help page of like TunePareto::tunePareto.knn.

Details

The "tunePareto.occ" encapsulates the classifier of an ordinal classifier cascade. Additionally, to the parameters of the corresponding base classifier the "class.order" parameter can be provided. It is either a character vector, a numeric vector, or a vector representing a cascade of the following format '1>2>4'.

Value

Returns an object of class TuneParetoClassifier (see: TunePareto::tuneParetoClassifier). This can be passed to the function trainTuneParetoClassifier (see: TunePareto::trainTuneParetoClassifier).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(TunePareto)
data(esl)
data = esl$data
labels = esl$labels
# train classifier
model <- trainTuneParetoClassifier( 
         classifier  = tunePareto.occ( base.classifier = tunePareto.svm()),
         trainData   = data,
         trainLabels = labels,
         class.order = as.character(c(4,3,1,0)),
         kernel      = "linear",
         cost        = 1)
         
# predict labels
prediction <- predict(object = model, newdata = data)

ORION documentation built on Feb. 7, 2022, 5:15 p.m.