powered by
Return the closest K-means cluster for a new dataset.
# S3 method for kmeans predict(object, newdata, ...)
The classification model (created by KMEANS).
KMEANS
A new dataset (a data.frame), with same variables as the learning dataset.
data.frame
Other parameters.
require (datasets) data (iris) d = splitdata (iris, 5) model = KMEANS (d$train.x, k = 3) predict (model, d$test.x)
Run the code above in your browser using DataLab