trainTuneParetoClassifier {TunePareto} | R Documentation |
Trains a classifier wrapped in a TuneParetoClassifier
object. The trained classifier model can then be passed to predict.TuneParetoModel
.
trainTuneParetoClassifier(classifier, trainData, trainLabels, ...)
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 |
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 |
tuneParetoClassifier
, predefinedClassifiers
, predict.TuneParetoModel
# 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)]))