Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3cb7ff

Browse files
stefmolinglemaitre
andauthored
DOC Ensure sklearn.metrics._classification.jaccard_score passes numpydoc validation (#23910)
* DOC: Update sklearn.metrics._classification.jaccard_score to pass numpydoc validation. * DOC Incorporate suggested changes to return type Co-authored-by: Guillaume Lemaitre <[email protected]> * DOC Incorporate suggested changes to return description. Co-authored-by: Guillaume Lemaitre <[email protected]> Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent 47dd54f commit c3cb7ff

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

sklearn/metrics/_classification.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,12 +738,16 @@ def jaccard_score(
738738
739739
Returns
740740
-------
741-
score : float (if average is not None) or array of floats, shape =\
742-
[n_unique_labels]
741+
score : float or ndarray of shape (n_unique_labels,), dtype=np.float64
742+
The Jaccard score. When `average` is not `None`, a single scalar is
743+
returned.
743744
744745
See Also
745746
--------
746-
accuracy_score, f1_score, multilabel_confusion_matrix
747+
accuracy_score : Function for calculating the accuracy score.
748+
f1_score : Function for calculating the F1 score.
749+
multilabel_confusion_matrix : Function for computing a confusion matrix\
750+
for each class or sample.
747751
748752
Notes
749753
-----

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"sklearn.linear_model._omp.orthogonal_mp_gram",
3131
"sklearn.manifold._locally_linear.locally_linear_embedding",
3232
"sklearn.manifold._t_sne.trustworthiness",
33-
"sklearn.metrics._classification.jaccard_score",
3433
"sklearn.metrics._plot.det_curve.plot_det_curve",
3534
"sklearn.metrics._plot.precision_recall_curve.plot_precision_recall_curve",
3635
"sklearn.metrics._ranking.coverage_error",

0 commit comments

Comments
 (0)