Skip to content

Commit 1b7a172

Browse files
theFool32mfeurer
authored andcommitted
Update gmeans.py (#572)
fix the bug of n_clusters not equals to len(cluster_centers)
1 parent 56af60d commit 1b7a172

File tree

1 file changed

+1
-1
lines changed
  • autosklearn/metalearning/metalearning/clustering

1 file changed

+1
-1
lines changed

autosklearn/metalearning/metalearning/clustering/gmeans.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def fit(self, X):
6969
break
7070

7171
# Refinement
72-
KMeans = sklearn.cluster.KMeans(n_clusters=1, n_init=1,
72+
KMeans = sklearn.cluster.KMeans(n_clusters=len(cluster_centers), n_init=1,
7373
init=np.array(cluster_centers),
7474
random_state=self.random_state)
7575
KMeans.fit(X)

0 commit comments

Comments
 (0)