-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[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
[DOC] Fixing n_jobs doc param in multiclass.py #17489
Conversation
sklearn/multiclass.py
Outdated
The number of jobs to use for the computation, where each job computes | ||
a classifier in parallel. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
sklearn/multiclass.py
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number of jobs to use for the computation: the n_classes | |
The number of jobs to use for the computation: the `n_classes` |
There was a problem hiding this comment.
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!
sklearn/multiclass.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
sklearn/multiclass.py
Outdated
The number of jobs to use for the computation: the code_size | ||
Output-Code multiclass problems are computed in parallel. |
There was a problem hiding this comment.
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."
There was a problem hiding this comment.
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!
sklearn/multiclass.py
Outdated
@@ -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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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 !
* 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
* 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
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