In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to understand the principle of K-means clustering, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
How to use K-means clustering correctly
Unsupervised learning refers to the machine learning problem of learning models from unlabeled data. Unlabeled data is the data obtained naturally, the model indicates that the essence of data category, transformation or probability unsupervised learning is to learn the statistical law or potential structure of the data, including clustering, dimensionality reduction and probability estimation.
KMeans algorithm is a typical distance-based clustering algorithm, which uses distance as the evaluation index of similarity, that is, the closer the distance between two objects, the greater the similarity. The algorithm believes that clusters are composed of objects close to each other, so the ultimate goal is to get compact and independent clusters.
The selection of K initial clustering centers has a great impact on the clustering results, because in the first step of the algorithm, any k objects are randomly selected as the initial clustering centers, which initially represent a cluster. In each iteration, the algorithm assigns each remaining object in the data set to the nearest cluster according to its distance from the center of each cluster. After examining all the data objects, an iterative operation is completed, and the new clustering center is calculated. The algorithm process is as follows:
(1) K data documents are randomly selected from N data documents (samples) as centroids (clustering centers).
In this paper, K clustering centers are randomly generated in the range of sample space in the process of initialization of clustering centers.
(2) measure the distance from each data document to each centroid and classify it into the nearest centroid class.
(3) recalculate the centroids of each class that have been obtained.
(4) iteration (2) ~ (3) until the new centroid is equal to the original centroid or less than the specified threshold, the algorithm ends.
The following picture shows several GIF, which vividly illustrate the process of k-means clustering. Data points.
Starting at 4: 00 on the far left.
Starting at 4: 00 on the far right.
Start with the four highest points
Start with four bottom lines.
Start with four random points in a cluster
The answer to the question on how to understand the principle of K-means clustering is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.