How to understand Kmeans Clustering in K-means clustering
Today I will introduce to you how to understand Kmeans Clustering in K-means clustering. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.
Kmeans Clustering
Kmeans algorithm is a clustering method that divides some disorganized numbers into several classes.
Implementation principle: (with the help of a screenshot on the Internet)
Algorithm steps: (k represents the number of clustering centers, the figure above is 3)
(1) randomly select any k objects as the initial clustering center, which initially represents a cluster.
(2) calculate the distance from the point to the center of mass and classify it into the class of the nearest center of mass.
(3) recalculate the centroids of each class that have been obtained
(4) iterating 2-3 steps until the new centroid is equal to the original centroid or less than the specified threshold, the algorithm ends.
Advantages and disadvantages of K-means algorithm:
1. The effect is good and it is not easy to be affected by the initial value.
two。 Can not deal with non-spherical clusters
3. Can not deal with clusters of different sizes and densities
4. Vulnerable to outliers (we need to intervene and eliminate them)
Common distance algorithms:
1. Euclidean distance
two。 CoSine similarity
These are all the contents of how to understand Kmeans Clustering in K-means clustering. For more information about how to understand Kmeans Clustering in K-means clustering, you can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!