predict.kmeans {fdm2id} | R Documentation |
Predict function for K-means
Description
Return the closest K-means cluster for a new dataset.
Usage
## S3 method for class 'kmeans'
predict(object, newdata, ...)
Arguments
object |
The classification model (created by |
newdata |
A new dataset (a |
... |
Other parameters. |
See Also
Examples
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = KMEANS (d$train.x, k = 3)
predict (model, d$test.x)
[Package fdm2id version 0.9.9 Index]