Skip to content

Commit e5e0d35

Browse files
authored
Update README.md
1 parent 69aa96b commit e5e0d35

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Clustring/K-Means/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
k-means clustering is a method of vector quantization, originally from signal processing, that aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster.
2+
3+
4+
5+
# Difference Between Kmeans annd KMean++
6+
7+
K-means starts with allocating cluster centers randomly and then looks for "better" solutions. K-means++ starts with allocation one cluster center randomly and then searches for other centers given the first one. So both algorithms use random initialization as a starting point, so can give different results on different runs. As an example you can check this lecture: Clustering As An Example Inference Problem, around 40th minute there are examples of k-means runs, but whole lecture is interesting.
8+
9+
So, answering your questions:
10+
11+
* No, because there is a random initialization different runs can give different results (see examples in the lecture). They should give comparable results but this is not guaranteed. Also, as all the centers are initialized randomly in k-means, it can give different results than k-means++.
12+
* K-means can give different results on different runs.
13+
* The k-means++ paper provides monte-carlo simulation results that show that k-means++ is both faster and provides a better performance, so there is no guarantee, but it may be better.
14+
As about your problem: what k-means++ does it chooses the centers and then starts a "classic" k-means. So what you can do is (1) use the part of algorithm that chooses centers and then (2) use those centers in the GPU implementations of k-means. This way at least a part of a problem is solved on GPU-based software, so should be faster.

0 commit comments

Comments
 (0)