-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC: Add link to plot_nnls example #31280
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
base: main
Are you sure you want to change the base?
Conversation
This is intended to add a link to the Non-negative least squares example in the LimearRegression API page. It is towards scikit-learn#30621. The following example is used: `plot_nnls.py` This example is linked in the User Guide for Linear Regression, but not anywhere on the API page.
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.
Hi @AidenFrank,
thank you for your contribution!
Would you mind moving the reference to the example up into the positive
constructor argument of LinearRegression
? This is the ideal place for users to find the example.
Apart from this I have suggested a little re-wording.
sklearn/linear_model/_base.py
Outdated
For an example of using Non-negative least squares in linear regression see | ||
:ref:`sphx_glr_auto_examples_linear_model_plot_nnls.py`. |
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.
I would suggest to re-formulate the reference description like this to not double with the title of the example, where "Non-negative least squares" will be already displayed.
For an example of using Non-negative least squares in linear regression see | |
:ref:`sphx_glr_auto_examples_linear_model_plot_nnls.py`. | |
For a comparison between a linear regression model with positive constraints | |
on the regression coefficients and a linear regression without such constraints, | |
see :ref:`sphx_glr_auto_examples_linear_model_plot_nnls.py`. |
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 comment, I will try to update this!
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.
Hi @StefanieSenger, just wanted to say that I have made the changes you suggested and it looks like the CI tests had no errors!
Hello @AidenFrank, thank you for applying the changes. I will approve this PR. @adrinjalali, do you think this is ready to merge? |
Reference Issues/PRs
Towards #30621.
What does this implement/fix? Explain your changes.
This is intended to add a link to the Non-negative least squares example in the LimearRegression API page.
The following example is used:
plot_nnls.py
This example is linked in the User Guide for Linear Regression, but not anywhere on the API page.