predict.TuneParetoModel {TunePareto} | R Documentation |
Prediction method for TuneParetoClassifier objects
Description
S3 method that predicts the labels of unknown samples using a trained TunePareteModel
model of a TuneParetoClassifier
object.
Usage
## S3 method for class 'TuneParetoModel'
predict(object, newdata, ...)
Arguments
object |
A |
newdata |
The samples whose class labels are predicted. This is usually a matrix or data frame with the samples in the rows and the features in the columns. |
... |
Further parameters for the predictor. These must be defined in the |
Value
Returns a vector of class labels for the samples in newdata
-
See Also
tuneParetoClassifier
, predefinedClassifiers
, trainTuneParetoClassifier
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)]))
[Package TunePareto version 2.5.3 Index]