python - How does sklearn.cluster.KMeans handle an init ndarray parameter with missing centroids (available centroids less than n_clusters)? -
in python sklearn kmeans (see documentation), wondering happens internally when passing ndarray of shape (n, n_features) init parameter, when n<n_clusters
- does drop given centroids , starts kmeans++ initialization default choice
initparameter ? (pdf paper kmeans++) (how kmeans++ work) - does consider given centroids , fill accordingly remaining centroids using kmeans++ ?
- does consider given centroids , fill remaining centroids using random values ?
i didn't expect method returns no warning in case. that's why need know how manages this.
if give mismatching init adjust number of clusters, can see source. not documented , consider bug. i'll propose fix it.
Comments
Post a Comment