Based on the documentation, it seems that kmeans2 is a standard k-means algorithm and works until it reaches a local optimum - and allows you to change the initialization of the seed.
The kmeans function will end earlier, based on the absence of changes, so it may not even reach a local optimum. In addition, the purpose of this is to create a codebook for matching feature vectors. The codebook itself is not necessarily generated from a breakpoint, but will use the lowest βdistortionβ iteration to generate the codebook. This method will also run kmeans several times. For more information, see the documentation.
If you just want to run the k-tool as an algorithm, select kmeans2. If you just need a codebook, select kmeans.
Raff.edward
source share