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

Skip to content

[DOC] Fixing n_jobs doc param in multiclass.py #17489

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 7 commits into from
Jun 6, 2020

Conversation

annejeevan
Copy link
Contributor

Reference Issues/PRs

Reference Issue #14228

What does this implement/fix? Explain your changes.

This fixes n_jobs param documentation in multiclass.py

Any other comments?

Submitted with @emdupre for the #DataUmbrella June sprint

Comment on lines 163 to 164
The number of jobs to use for the computation, where each job computes
a classifier in parallel.
Copy link
Member

Choose a reason for hiding this comment

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

thanks for the PR @annejeevan

I feel like the current formulation may suggest that the internal implementation of the classifier is parallelized which is usually not the case

How about

The number of jobs to use for the computation: the n_classes one-vs-rest problems are computed in parallel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the feedback @NicolasHug .
Yes, it looks like. Sure. That looks good. I will try to modify the doc string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @NicolasHug, I have modified accordingly. Can you please check the PR? Thanks!

@@ -160,7 +160,9 @@ class OneVsRestClassifier(MultiOutputMixin, ClassifierMixin,
:term:`decision_function` or :term:`predict_proba`.

n_jobs : int or None, optional (default=None)
The number of jobs to use for the computation.
The number of jobs to use for the computation: the n_classes
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
The number of jobs to use for the computation: the n_classes
The number of jobs to use for the computation: the `n_classes`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @NicolasHug, I have modified accordingly. Can you please check the PR? Thanks!

@@ -504,7 +506,9 @@ class OneVsOneClassifier(MetaEstimatorMixin, ClassifierMixin, BaseEstimator):
:term:`decision_function` or :term:`predict_proba`.

n_jobs : int or None, optional (default=None)
The number of jobs to use for the computation.
The number of jobs to use for the computation: the n_classes
Copy link
Member

Choose a reason for hiding this comment

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

In this case there are n_classes * (n_classes - 1) / 2 OVO problems

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @NicolasHug, I have modified accordingly. Can you please check the PR? Thanks!

Comment on lines 738 to 739
The number of jobs to use for the computation: the code_size
Output-Code multiclass problems are computed in parallel.
Copy link
Member

Choose a reason for hiding this comment

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

looks like the actual number is tricky here so let's just go with "the multiclass problems are computed in parallel."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @NicolasHug, I have modified accordingly. Can you please check the PR? Thanks!

@@ -160,8 +160,7 @@ class OneVsRestClassifier(MultiOutputMixin, ClassifierMixin,
:term:`decision_function` or :term:`predict_proba`.

n_jobs : int or None, optional (default=None)
The number of jobs to use for the computation, where each job computes
a classifier in parallel.
The number of jobs to use for the computation: the n_classes one-vs-rest problems are computed in parallel.
Copy link
Member

Choose a reason for hiding this comment

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

This needs to rewrap to make sure we are under 80 characters per line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure @thomasjpfan. I think I have updated it already. Can you please verify the new commit.

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.

LGTM Thank you @emdupre and @annejeevan !

@thomasjpfan thomasjpfan merged commit d6ed0d0 into scikit-learn:master Jun 6, 2020
viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
* Fixing n_jobs doc param in multiclass.py

* Fixing n_jobs doc param in multiclass.py

* Fixing n_jobs doc param in multiclass.py

* Better documenting n_jobs param in multiclass

* Better documenting n_jobs param in multiclass

* Better documenting n_jobs param in multiclass

* Better documenting n_jobs param in multiclass
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
* Fixing n_jobs doc param in multiclass.py

* Fixing n_jobs doc param in multiclass.py

* Fixing n_jobs doc param in multiclass.py

* Better documenting n_jobs param in multiclass

* Better documenting n_jobs param in multiclass

* Better documenting n_jobs param in multiclass

* Better documenting n_jobs param in multiclass
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.

3 participants