predict.knn {fdm2id} | R Documentation |
Model predictions
Description
This function predicts values based upon a model trained by KNN
.
Usage
## S3 method for class 'knn'
predict(object, test, fuzzy = FALSE, ...)
Arguments
object |
The classification model (of class |
test |
The test set (a |
fuzzy |
A boolean indicating whether fuzzy classification is used or not. |
... |
Other parameters. |
Value
A vector of predicted values (factor
).
See Also
Examples
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = KNN (d$train.x, d$train.y)
predict (model, d$test.x)
[Package fdm2id version 0.9.9 Index]