predict.knncat {knncat}R Documentation

Prediict on a knncat classifier

Description

Produce predictions for a knncat classifier

Usage

## S3 method for class 'knncat':
predict(object, train, newdata, 
train.classcol=1, newdata.classcol=1, return.classes=TRUE,
more=FALSE, verbose = 0, ...)

Arguments

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

Details

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.

Value

None.

Author(s)

Samuel E. Buttrey, buttrey@nps.edu


[Package knncat version 1.1.11 Index]