predict.kmeans | R Documentation |
Return the closest K-means cluster for a new dataset.
## S3 method for class 'kmeans'
predict(object, newdata, ...)
object |
The classification model (created by |
newdata |
A new dataset (a |
... |
Other parameters. |
KMEANS
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = KMEANS (d$train.x, k = 3)
predict (model, d$test.x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.