Skip to content

Commit d721855

Browse files
mlantKiraLazu
authored andcommitted
DOC Ensures that silhouette_samples passes numpydoc (scikit-learn#21851)
Co-authored-by: mlant <marie.lanternier@free.fr>
1 parent 289a106 commit d721855

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

sklearn/metrics/cluster/_unsupervised.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def silhouette_samples(X, labels, *, metric="euclidean", **kwds):
188188
If ``X`` is the distance array itself, use "precomputed" as the metric.
189189
Precomputed distance matrices must have 0 along the diagonal.
190190
191-
`**kwds` : optional keyword parameters
191+
**kwds : optional keyword parameters
192192
Any further parameters are passed directly to the distance function.
193193
If using a ``scipy.spatial.distance`` metric, the parameters are still
194194
metric dependent. See the scipy docs for usage examples.
@@ -208,7 +208,6 @@ def silhouette_samples(X, labels, *, metric="euclidean", **kwds):
208208
209209
.. [2] `Wikipedia entry on the Silhouette Coefficient
210210
<https://en.wikipedia.org/wiki/Silhouette_(clustering)>`_
211-
212211
"""
213212
X, labels = check_X_y(X, labels, accept_sparse=["csc", "csr"])
214213

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"sklearn.metrics.cluster._supervised.pair_confusion_matrix",
118118
"sklearn.metrics.cluster._supervised.rand_score",
119119
"sklearn.metrics.cluster._supervised.v_measure_score",
120-
"sklearn.metrics.cluster._unsupervised.silhouette_samples",
121120
"sklearn.metrics.pairwise.additive_chi2_kernel",
122121
"sklearn.metrics.pairwise.check_paired_arrays",
123122
"sklearn.metrics.pairwise.check_pairwise_arrays",

0 commit comments

Comments
 (0)