Skip to content

DOC Linear regression doc update #21258

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

Conversation

simonandras
Copy link
Contributor

@simonandras simonandras commented Oct 6, 2021

Reference Issues/PRs

Fixes #21254.
Related to #14228.

What does this implement/fix? Explain your changes.

By fitting a LinearRegression the n_jobs parameter can set the number of threads only in case of positive=True or in case of sp.issparse(X). In other cases the linalg.lstsq is called which can handle (M, K) shaped y and there is no parameter like n_jobs in this call.

Docstring is updated according to this.

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.

Thank you for the PR @simonamaggio !

@thomasjpfan thomasjpfan changed the title Linear regression doc update DOC Linear regression doc update Oct 6, 2021
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
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

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

This is a nice clarification of the role of n_jobs for the execution of LinearRegression. 👍

Here is a sole comment.

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
@simonandras
Copy link
Contributor Author

Thank you for the rewievs and the comments. 👍

Copy link
Member

@jjerphan jjerphan 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 @simonandras!

@adrinjalali adrinjalali merged commit ccf8e74 into scikit-learn:main Oct 12, 2021
@simonandras simonandras deleted the LinearRegression_doc_n_jobs_update branch October 12, 2021 10:13
@glemaitre glemaitre mentioned this pull request Oct 23, 2021
10 tasks
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.

n_jobs parameter documentation in LinearRegression
4 participants