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

Skip to content

ENH Verbosity for OneVsRestClassifier - #22508

Merged
ogrisel merged 6 commits into
scikit-learn:mainfrom
combscCode:verbosity-for-onevsrestclassifier
Feb 18, 2022
Merged

ENH Verbosity for OneVsRestClassifier#22508
ogrisel merged 6 commits into
scikit-learn:mainfrom
combscCode:verbosity-for-onevsrestclassifier

Conversation

@combscCode

@combscCode combscCode commented Feb 16, 2022

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #22441

What does this implement/fix? Explain your changes.

Adds a verbose parameter to sklearn.multiclass.OneVsRestClassifier so progress can be seen while the model is fitting.

Any other comments?

I'm not familiar with the best way to link to external libraries. I mention joblib.Parallel in documentation but I'm not sure if there's a better way to directly link to it using Sphinx. LMK if there's a better way to do this!

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the PR!

Please add an entry to the change log at doc/whats_new/v1.1.rst with tag |Enhancement|. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:.

Comment thread sklearn/multiclass.py Outdated
The verbosity level, if non zero, progress messages are printed.
Below 50, the output is sent to stderr. Otherwise, the output is sent
to stdout. The frequency of the messages increases with the verbosity
level, reporting all iterations at 10. See joblib.Parallel for more

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can link directly out to the API docs for Parallel:

Suggested change
level, reporting all iterations at 10. See joblib.Parallel for more
level, reporting all iterations at 10. See :class:`joblib.Parallel` for more

Comment thread sklearn/multiclass.py Outdated
multilabel classification.
sklearn.preprocessing.MultiLabelBinarizer : Transform iterable of iterables
to binary indicator matrix.
joblib.Parallel : Class used for parallel training.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can link in the verbose docstring itself.

Suggested change
joblib.Parallel : Class used for parallel training.

@thomasjpfan thomasjpfan changed the title Verbosity for OneVsRestClassifier ENH Verbosity for OneVsRestClassifier Feb 16, 2022

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small commit, otherwise LGTM.

I think it's okay to not test for the output, since we are directly passing parameter directly to Parallel.

Comment thread sklearn/multiclass.py
@thomasjpfan thomasjpfan added module:multiclass Quick Review For PRs that are quick to review labels Feb 16, 2022

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

@ogrisel
ogrisel merged commit 807dd18 into scikit-learn:main Feb 18, 2022
thomasjpfan added a commit to thomasjpfan/scikit-learn that referenced this pull request Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:multiclass Quick Review For PRs that are quick to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verbosity for OneVsRestClassifier

3 participants