When Kmeans using initMode = "random" and some random seed, it is possible the actual cluster size doesn't equal to the configured `k`.
In this case, summary(model) returns error due to the number of cols of coefficient matrix doesn't equal to k.
- is related to
SPARK-3261 KMeans clusterer can return duplicate cluster centers
- links to