Learn R Programming

kohonen (version 1.1.1)

somKmeans: Refinement of codebook vectors by kmeans

Description

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.

Usage

somKmeans(codes, data, max.iter = 20, verbose = FALSE)

Arguments

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.

Value

  • Returns a list with components
  • codesnew codebook matrix.
  • classifclassification vector.
  • niternumber of iterations needed for kmeans.