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

Skip to content

DOC Add interval notation for include_boundaries in documentation check_scalar #21955

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 9 commits into from
Dec 17, 2021

Conversation

yadav-sachin
Copy link
Contributor

@yadav-sachin yadav-sachin commented Dec 11, 2021

Reference Issues/PRs

Fixes #21947

What does this implement/fix? Explain your changes.

I replaced the sentence descriptions for possible choices of parameter include_boundaries in the documentation of function check_scalar with interval notations.

Any other comments?

The members are discussing which interval notation to use. I went ahead and made changes as per the English notation. Will make changes, if members decide to go ahead with other notation.

@yadav-sachin yadav-sachin changed the title [MRG] Add English Interval notation for include_boundaries parameter in check_scalar function doc [MRG] Add English interval notation for parameter include_boundaries in documentation of function check_scalar Dec 11, 2021
@yadav-sachin yadav-sachin changed the title [MRG] Add English interval notation for parameter include_boundaries in documentation of function check_scalar [MRG] DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar Dec 13, 2021
@reshamas
Copy link
Member

Thanks @yadav-sachin.
To clarify, I think we should leave the text in and add the interval notation at the end.
I added it in the first line below.

        - `"left"`: only `min_val` is included in the valid interval;  [`min_val`, `max_val`)
        - `"right"`: only `max_val` is included in the valid interval;
        - `"both"`: `min_val` and `max_val` are included in the valid interval;
        - `"neither"`: neither `min_val` nor `max_val` are included in the
          valid interval.

@reshamas
Copy link
Member

Here's the preview:
https://166819-843222-gh.circle-artifacts.com/0/doc/modules/generated/sklearn.utils.check_scalar.html

It's ok. Though I think the addition of [min_val, max_val) washes out the parentheses interval. Not sure what the reviewers think. I would be happy with:

        - `"left"`: only `min_val` is included in the valid interval;  [ a, b )
        - `"right"`: only `max_val` is included in the valid interval;  ( a, b ]
        - `"both"`: `min_val` and `max_val` are included in the valid interval; [ a, a ]
        - `"neither"`: neither `min_val` nor `max_val` are included in the
          valid interval.  ( a, a )

@yadav-sachin yadav-sachin changed the title [MRG] DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar [WIP] DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar Dec 14, 2021
@yadav-sachin yadav-sachin changed the title [WIP] DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar [MRG] DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar Dec 14, 2021
@@ -1386,10 +1386,13 @@ def check_scalar(
the boundaries. Possible choices are:

- `"left"`: only `min_val` is included in the valid interval;
[ min_val, max_val )
Copy link
Member

Choose a reason for hiding this comment

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

        - `"left"`: only `min_val` is included in the valid interval.
           It is equivalent to the interval `[ min_val, max_val )`;

Copy link
Member

Choose a reason for hiding this comment

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

Can you make similar changes for the other entries?

@glemaitre glemaitre changed the title [MRG] DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar Dec 15, 2021
@glemaitre glemaitre changed the title DOC: Add English interval notation for parameter include_boundaries in documentation of function check_scalar DOC Add interval notation for include_boundaries in documentation check_scalar Dec 16, 2021
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.

LGTM. @reshamas do you want to have a look before that I merge it?

@reshamas
Copy link
Member

LGTM. @reshamas do you want to have a look before that I merge it?

@glemaitre Can we remove the semicolons at the end of each bullet point? It's a little distracting, and I wouldn't want users to think semicolons are related to intervals.
Otherwise, it works.

@glemaitre
Copy link
Member

@glemaitre Can we remove the semicolons at the end of each bullet point?

I always thought that it was the formal way to write a proper bullet list: https://english.stackexchange.com/a/15134
We can as well finish each sentence by a full stop in this case as well. It might be less confusing.

@reshamas
Copy link
Member

@glemaitre Ok, let's go with full stop at end.

@glemaitre glemaitre merged commit 787e4d2 into scikit-learn:main Dec 17, 2021
@glemaitre
Copy link
Member

Thanks @yadav-sachin @reshamas all good to go

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.

Add interval notation for include_boundaries parameter for the function check_scalar
3 participants