| predict.pam | R Documentation |
Returns the cluster of the closest medoid, for a new dataset.
## S3 method for class 'pam'
predict(object, newdata, ...)
object |
The clustering (created by |
newdata |
A new dataset (a |
... |
Other parameters. |
A vector of cluster numbers.
PAM, predict.kmeans
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = PAM (d$train.x, 3)
table (predict (model, d$test.x), d$test.y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.