predict.knn {knnTree}R Documentation

Predict using a knn object

Description

Predict class labels from a knn object and some data

Usage

predict.knn (object, test, train, theyre.the.same = FALSE,
return.classifications = FALSE, verbose=0, ...)

Arguments

object
test
train
theyre.the.same
return.classifications
verbose
...

{Other arguments, currently ignored}

Details

This uses a knn object created by R{knn.var} to make predictions on some data.

Value

List with a component named "rate" giving test set error rate. If return.classifications = TRUE, a second item named classifications is a vector with the classification of each item in the test set.

Author(s)

Sam Buttrey buttrey@nps.navy.mil

References

Buttrey and Karo, 2002

See Also

link{knn.var}, knnTree


[Package knnTree version 1.2.4 Index]