Skip to content

[MRG] Makes roc_auc_score and average_precision_score docstrings more explicit #9557

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 4 commits into from
Aug 22, 2017
Merged
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
8 changes: 4 additions & 4 deletions sklearn/metrics/ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def average_precision_score(y_true, y_score, average="macro",
Parameters
----------
y_true : array, shape = [n_samples] or [n_samples, n_classes]
True binary labels in binary label indicators.
True binary labels (either {0, 1} or {-1, 1}).

y_score : array, shape = [n_samples] or [n_samples, n_classes]
Target scores, can either be probability estimates of the positive
Expand Down Expand Up @@ -200,7 +200,7 @@ def roc_auc_score(y_true, y_score, average="macro", sample_weight=None):
Parameters
----------
y_true : array, shape = [n_samples] or [n_samples, n_classes]
True binary labels in binary label indicators.
True binary labels (either {0, 1} or {-1, 1}).

y_score : array, shape = [n_samples] or [n_samples, n_classes]
Target scores, can either be probability estimates of the positive
Expand Down Expand Up @@ -438,8 +438,8 @@ def roc_curve(y_true, y_score, pos_label=None, sample_weight=None,
----------

y_true : array, shape = [n_samples]
True binary labels in range {0, 1} or {-1, 1}. If labels are not
binary, pos_label should be explicitly given.
True binary labels. If labels are not either {-1, 1} or {0, 1}, then
pos_label should be explicitly given.

y_score : array, shape = [n_samples]
Target scores, can either be probability estimates of the positive
Expand Down