February 2018
Intermediate to advanced
378 pages
10h 14m
English
An improved algorithm was proposed in 2007. K-means++ addresses the problem of suboptimal clustering by introducing an additional step for a good centroids initialization.
An improved algorithm of initial centers selection looks like this:
In Swift, it looks like this:
internal mutating func chooseCentroids() { let n = data.count ...Read now
Unlock full access