Fixed-Sized Clusters k-Means
Mikko Malinen, Pasi Fränti · Qeios · 2025
We present a \(k\)-means-based clustering algorithm, which optimizes the mean square error, for given cluster sizes. A straightforward application is balanced clustering, where the sizes of each cluster are equal. In the \(k\)-means assignment phase, the algorithm solves an assignment problem using the Hungarian algorithm. This makes the assignment phase time complexity \(O(n^3)\). This enables clustering of datasets of size more than 5000 points.