predict.knncat {knncat} | R Documentation |
Produce predictions for a knncat classifier
## S3 method for class 'knncat' predict(object, train, newdata, train.classcol=1, newdata.classcol=1, return.classes=TRUE, more=FALSE, verbose = 0, ...)
object |
Knncat object, from knncat |
train |
Training set used to build classifier |
newdata |
New data on which to make predictions |
train.classcol |
Column number for classification in training set. Default: 1 |
newdata.classcol |
Column number for classification in newdata set. Default: 1. If <= 0, new data has no classifications. |
return.classes |
Logical; if TRUE, return a vector of classifications of the newdata set. Default: TRUE |
more |
Logical; if TRUE, also print error rate. Default: FALSE |
verbose |
Level of verbosity for debugging. Default: 0 |
... |
Other arguments, currently ignored |
This prints the misclassification rate from the knncat classifier, together with an indication as to whether it was based on a training or test set.
None.
Samuel E. Buttrey, buttrey@nps.edu