Skip to content

[MRG] CLN Cleans up roc curve plotting #14723

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 23, 2019

Conversation

thomasjpfan
Copy link
Member

This PR includes:

  1. Updates Docstring style
  2. Detects if matplotlib is installed early.
  3. Fixes docstring links.

@@ -7,7 +7,7 @@
class RocCurveDisplay:
"""ROC Curve visualization.

It is recommend to use `sklearn.metrics.plot_roc_curve` to create a
It is recommend to use :func:`~sklearn.metrics.plot_roc_curve` to create a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the tilde do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With tilde:

Screen Shot 2019-08-22 at 4 30 58 PM

Without tilde:

Screen Shot 2019-08-22 at 4 34 00 PM

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 tiny changes. LGTM

Target values.

pos_label : int or str, default=None
The label of the positive class.
When `pos_label=None`, if y_true is in {-1, 1} or {0, 1},
`pos_label` is set to 1, otherwise an error will be raised.

sample_weight : array-like, shape (n_samples, ) or None, default=None
sample_weight : array-like of shape (n_samples, ), default=None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sample_weight : array-like of shape (n_samples, ), default=None
sample_weight : array-like of shape (n_samples,), default=None

Input values.

y : array-like, shape (n_samples, )
y : array-like of shape (n_samples, )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
y : array-like of shape (n_samples, )
y : array-like of shape (n_samples,)

@glemaitre glemaitre merged commit f09839d into scikit-learn:master Aug 23, 2019
@glemaitre
Copy link
Member

Thanks @thomasjpfan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants