somKmeans {kohonen} | R Documentation |
Do kmeans of the codebook vectors, which is equivalent to the SOM algorithm when the size of the neighbourhood is smaller than 1. Not meant to be called directly.
somKmeans(codes, data, max.iter = 20, verbose = FALSE)
codes |
codebook matrix for the X space: one row per unit. |
data |
training data, usually. |
max.iter |
default is 20, but convergence usually is much faster. If more iterations are needed, a warning is printed. |
verbose |
print more info to the screen. |
Returns a list with components
codes |
new codebook matrix. |
classif |
classification vector. |
niter |
number of iterations needed for kmeans. |
Ron Wehrens