Description Usage Arguments Details Value Examples
View source: R/tunePareto.occ.R
TunePareto wrapper for the ordinal classifier cascade.
1 | tunePareto.occ(base.classifier)
|
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 |
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'.
Returns an object of class TuneParetoClassifier (see: TunePareto::tuneParetoClassifier
).
This can be passed to the function trainTuneParetoClassifier (see: TunePareto::trainTuneParetoClassifier
).
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.