Skip to content

DOC Clarify shape in OVO and OVR decision function docstring #18279

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 2 commits into from
Aug 27, 2020

Conversation

lucyleeow
Copy link
Member

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Clarify shape in OVR and OVO docstring

Any other comments?

@lucyleeow lucyleeow changed the title DOC Clarify shape in OVO and OVR decision function DOC Clarify shape in OVO and OVR decision function docstring Aug 27, 2020
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

I do not think we need to be too strict on the docstring type for the return.

LGTM

@@ -412,7 +412,8 @@ def decision_function(self, X):

Returns
-------
T : array-like of shape (n_samples, n_classes)
T : array-like of shape (n_samples, n_classes) or (n_samples,) if \
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
T : array-like of shape (n_samples, n_classes) or (n_samples,) if \
T : array-like of shape (n_samples, n_classes) or (n_samples,) for \

@@ -687,7 +688,8 @@ def decision_function(self, X):

Returns
-------
Y : array-like of shape (n_samples, n_classes)
Y : array-like of shape (n_samples, n_classes) or (n_samples,) if \
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, n_classes) or (n_samples,) if \
Y : array-like of shape (n_samples, n_classes) or (n_samples,) for \

@lucyleeow
Copy link
Member Author

I do not think we need to be too strict on the docstring type for the return.

Point taken. I was just initially confused by the version changed note

@thomasjpfan
Copy link
Member

Point taken. I was just initially confused by the version changed note

I think it has to do with #9100 . decision_function use to return (n_samples, 1) and was changed to (n_samples,).

@jnothman jnothman merged commit 98b4e48 into scikit-learn:master Aug 27, 2020
@jnothman
Copy link
Member

Thanks @lucyleeow

jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
@lucyleeow lucyleeow deleted the doc_ovo branch October 21, 2023 03:27
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.

3 participants