# K-Means Clustering Overview

Overview

K-Means clustering generates a specific number of disjoint, flat (non-hierarchical) clusters. It is well suited to generating globular clusters. The K-Means method is numerical, unsupervised, non-deterministic and iterative.

K-Means Algorithm Properties

• There are always K clusters.

• There is always at least one item in each cluster.

• The clusters are non-hierarchical and they do not overlap.

• Every member of a cluster is closer to its cluster than any other cluster because closeness does not always involve the 'center' of clusters.

The K-Means Algorithm Process

• The dataset is partitioned into K clusters and the data points are randomly assigned to the clusters resulting in clusters that have roughly the same number of data points.

• For each data point:

• Calculate the distance from the data point to each cluster.

• If the data point is closest to its own cluster, leave it where it is. If the data point is not closest to its own cluster, move it into the closest cluster.

• Repeat the above step until a complete pass through all the data points results in no data point moving from one cluster to another. At this point the clusters are stable and the clustering process ends.

• The choice of initial partition can greatly affect the final clusters that result, in terms of inter-cluster and intracluster distances and cohesion.

The version of the K-Means algorithm used in GeneLinker™ differs from the conventional K-Means algorithm in that GeneLinker™ does not compute the centroid of the clusters to measure the distance from a data point to a cluster. Instead, the algorithm uses a specified linkage distance metric. The use of the Average Linkage distance metric most closely corresponds to conventional K-Means, but can produce different results in many cases.

• With a large number of variables, K-Means may be computationally faster than hierarchical clustering (if K is small).

• K-Means may produce tighter clusters than hierarchical clustering, especially if the clusters are globular.

• Difficulty in comparing quality of the clusters produced (e.g. for different initial partitions or values of K affect outcome).

• Fixed number of clusters can make it difficult to predict what K should be.

• Does not work well with non-globular clusters.

• Different initial partitions can result in different final clusters. It is helpful to rerun the program using the same as well as different K values, to compare the results achieved.

Note the Warning in Pearson Correlation and Pearson Squared Distance Metric on use of K-Means clustering.

Related Topics:

Distance Metrics Overview
{"ft_lang_label":"__label__en","ft_lang_prob":0.86193717,"math_prob":0.89615184,"size":2744,"snap":"2022-27-2022-33","text_gpt3_token_len":557,"char_repetition_ratio":0.16861314,"word_repetition_ratio":0.009433962,"special_character_ratio":0.17966472,"punctuation_ratio":0.082474224,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9629473,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-29T05:50:25Z\",\"WARC-Record-ID\":\"<urn:uuid:99a8fe38-a121-4b05-adb6-f74f4d002ff0>\",\"Content-Length\":\"7882\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:33d85f1e-6fdd-4643-adbc-803ca64cf1ca>\",\"WARC-Concurrent-To\":\"<urn:uuid:7615abbf-2d56-4ca0-b7e8-c3f132f03815>\",\"WARC-IP-Address\":\"216.194.68.42\",\"WARC-Target-URI\":\"http://www.improvedoutcomes.com/docs/WebSiteDocs/Clustering/K-Means_Clustering_Overview.htm\",\"WARC-Payload-Digest\":\"sha1:A7Z26VPC6TQC5V4ZZSUPKJENYNL7YG5D\",\"WARC-Block-Digest\":\"sha1:EOQ2VGQL6IQCHDKUQOOFROVIUGSZ4JPG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103624904.34_warc_CC-MAIN-20220629054527-20220629084527-00143.warc.gz\"}"}