8000 DOC minor update to make_classification about flip_y by NicolasHug · Pull Request #18720 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC minor update to make_classification about flip_y #18720

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 3 commits into from
Nov 1, 2020

Conversation

NicolasHug
Copy link
Member

Follow up to #18717 to prevent future confusion

Copy link
Member
@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 102 to 103
``weights`` exceeds 1. Note that the actual class proportions will
not exactly match `weights` when `flip_y` isn't 0.
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
``weights`` exceeds 1. Note that the actual class proportions will
not exactly match `weights` when `flip_y` isn't 0.
``weights`` exceeds 1. Note that only if ``flip_y=0``, the actual class
proportions will exactly match ``weights``.

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly I find the original phrasing more natural

Copy link
Member

Choose a reason for hiding this comment

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

I tried to avoid the double negative - just a suggestion.


flip_y : float, default=0.01
The fraction of samples whose class is assigned randomly. Larger
values introduce noise in the labels and ma 8000 ke the classification
task harder. Note that the default setting flip_y > 0 might lead
to less than n_classes in y in some cases.
to less than `n_classes` in y in some cases.
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
to less than `n_classes` in y in some cases.
to less than ``n_classes`` in y in some cases.

Only because in this file double backticks seem to be used consistently.

@NicolasHug
Copy link
Member Author

Thanks for the review @lorentzenchr . I switched to double backticks but we typically don't care about single vs double backticks, so lets not go to far in the nitpicks with that ;)

@NicolasHug NicolasHug changed the title [MRG] DOC minor update to make_classification about flip_y DOC minor update to make_classification about flip_y Nov 1, 2020
@NicolasHug NicolasHug merged commit 5309179 into scikit-learn:master Nov 1, 2020
@NicolasHug NicolasHug deleted the flip_y_lol branch November 1, 2020 13:33
@lorentzenchr
Copy link
Member

Thanks for the review @lorentzenchr . I switched to double backticks but we typically don't care about single vs double backticks, so lets not go to far in the nitpicks with that ;)

👍

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

Successfully merging this pull request may close these issues.

2 participants
0