powered by
Returns the cluster of the closest unit of the map, for a new dataset.
# S3 method for som predict(object, newdata, ...)
A vector of cluster numbers.
The map (created by SOM).
SOM
A new dataset (a data.frame), with the same variables as the learning dataset.
data.frame
Other parameters.
SOM, plot.som
plot.som
# \donttest{ require (datasets) data (iris) d = splitdata (iris, 5) model = SOM (d$train.x, 4, 4) table (predict (model, d$test.x), d$test.y) # }
Run the code above in your browser using DataLab