trainTuneParetoClassifier {TunePareto} | R Documentation |
Train a TunePareto classifier
Description
Trains a classifier wrapped in a TuneParetoClassifier
object. The trained classifier model can then be passed to predict.TuneParetoModel
.
Usage
trainTuneParetoClassifier(classifier, trainData, trainLabels, ...)
Arguments
classifier |
A |
trainData |
The data set to be used for the classifier training. This is usually a matrix or data frame with the samples in the rows and the features in the columns. |
trainLabels |
A vector of class labels for the samples in |
... |
Further parameters to be passed to the classifier. These must be parameters specified in the |
Value
Returns an object of class TuneParetoModel
with the following entries
classifier |
The classifier object supplied in the |
classifierParams |
The additional parameters supplied to the classifier in the |
trainData |
If |
trainLabels |
If |
model |
If |
See Also
tuneParetoClassifier
, predefinedClassifiers
, predict.TuneParetoModel
Examples
# train an SVM classifier
cl <- tunePareto.svm()
tr <- trainTuneParetoClassifier(cl,
iris[,-ncol(iris)],
iris[,ncol(iris)],
cost=0.001)
# re-apply the classifier to predict the training data
print(iris[,ncol(iris)])
print(predict(tr, iris[,-ncol(iris)]))