| predict.som | R Documentation |
Returns the cluster of the closest unit of the map, for a new dataset.
## S3 method for class 'som'
predict(object, newdata, ...)
object |
The map (created by |
newdata |
A new dataset (a |
... |
Other parameters. |
A vector of cluster numbers.
SOM, plot.som
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = SOM (d$train.x, 4, 4)
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.