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

Skip to content

DOC Ensure completeness_score passes numpydoc validation #23016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions sklearn/metrics/cluster/_supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def homogeneity_score(labels_true, labels_pred):


def completeness_score(labels_true, labels_pred):
"""Completeness metric of a cluster labeling given a ground truth.
"""Compute completeness metric of a cluster labeling given a ground truth.

A clustering result satisfies completeness if all the data points
that are members of a given class are elements of the same cluster.
Expand All @@ -572,15 +572,20 @@ def completeness_score(labels_true, labels_pred):
Parameters
----------
labels_true : int array, shape = [n_samples]
ground truth class labels to be used as a reference
Ground truth class labels to be used as a reference.

labels_pred : array-like of shape (n_samples,)
cluster labels to evaluate
Cluster labels to evaluate.

Returns
-------
completeness : float
score between 0.0 and 1.0. 1.0 stands for perfectly complete labeling
Score between 0.0 and 1.0. 1.0 stands for perfectly complete labeling.

See Also
--------
homogeneity_score : Homogeneity metric of cluster labeling.
v_measure_score : V-Measure (NMI with arithmetic mean option).

References
----------
Expand All @@ -589,11 +594,6 @@ def completeness_score(labels_true, labels_pred):
conditional entropy-based external cluster evaluation measure
<https://aclweb.org/anthology/D/D07/D07-1043.pdf>`_

See Also
--------
homogeneity_score
v_measure_score

Examples
--------

Expand Down
1 change: 0 additions & 1 deletion sklearn/tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"sklearn.metrics.cluster._bicluster.consensus_score",
"sklearn.metrics.cluster._supervised.adjusted_mutual_info_score",
"sklearn.metrics.cluster._supervised.adjusted_rand_score",
"sklearn.metrics.cluster._supervised.completeness_score",
"sklearn.metrics.cluster._supervised.entropy",
"sklearn.metrics.cluster._supervised.fowlkes_mallows_score",
"sklearn.metrics.cluster._supervised.homogeneity_completeness_v_measure",
Expand Down