Github user yanboliang commented on the issue:
https://github.com/apache/spark/pull/15342
I'm more prefer to maintain the original logic that keep
```model.clusterCenters.length``` equal to ```k```. Was there some discussion
as to make this change?
I checked popular Python machine learning library scikit-learn, it return
the requested number of centroids:

And for R kmeans, it throw error if there is more cluster centers than
distinct data points:

---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]