Skip to content

Commit 45ba9c6

Browse files
committed
Clustering: Deprecate silhouette in kmeans
1 parent a292cc2 commit 45ba9c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Orange/clustering/kmeans.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def __init__(self, n_clusters=8, init='k-means++', n_init=10, max_iter=300,
3030
"compute_silhouette_score is deprecated. Please use "
3131
"sklearn.metrics.silhouette_score to compute silhouettes.",
3232
DeprecationWarning)
33-
super().__init__(preprocessors, vars())
33+
super().__init__(
34+
preprocessors, {k: v for k, v in vars().items()
35+
if k != "compute_silhouette_score"})
3436

3537

3638
if __name__ == "__main__":

0 commit comments

Comments
 (0)