predict.knn {knnTree} | R Documentation |
Predict class labels from a knn object and some data
predict.knn (object, test, train, theyre.the.same = FALSE, return.classifications = FALSE, verbose=0, ...)
object |
|
test |
|
train |
|
theyre.the.same |
|
return.classifications |
|
verbose |
|
... |
{Other arguments, currently ignored}
This uses a knn object created by R{knn.var} to make predictions on some data.
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.
Sam Buttrey buttrey@nps.navy.mil
Buttrey and Karo, 2002
link{knn.var}
, knnTree