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

Skip to content

DOC: Add seealso link to Ridge regression example in user guide (#30621) #31581

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dhyeyinf
Copy link
Contributor

This PR adds a contextual seealso reference in the Ridge regression section of the user guide to link the plot_ridge_path.py example.

Although the example was already listed at the bottom, this inline reference improves discoverability for readers following the theoretical explanation.

Closes #30621 for this example.

Copy link

github-actions bot commented Jun 18, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: b93b409. Link to the linter CI: here

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

The user guide already has enough links to that example. You could instead add a link to the example in the docstring of alpha in Ridge.

Comment on lines 112 to 117
.. seealso::

For a visual demonstration of how Ridge coefficients evolve with regularization,
see *plot_ridge_path.py*:
:ref:`sphx_glr_auto_examples_linear_model_plot_ridge_path.py`

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we use the .. seealso directive for these. But maybe we should.

@dhyeyinf
Copy link
Contributor Author

Hi!
Thanks for the helpful feedback. I've removed the user guide change and instead updated the alpha parameter docstring in the Ridge class to include a link to the relevant example (plot_ridge_path.py), as suggested.

Let me know if any further adjustments are needed. Thanks again!

@@ -109,6 +109,13 @@ The complexity parameter :math:`\alpha \geq 0` controls the amount
of shrinkage: the larger the value of :math:`\alpha`, the greater the amount
of shrinkage and thus the coefficients become more robust to collinearity.

.. seealso::
Copy link
Member

Choose a reason for hiding this comment

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

I think you forgot to remove these or push the removal here.

@dhyeyinf
Copy link
Contributor Author

Hi @adrinjalali,
Thanks for pointing that out — I just noticed the leftover seealso block hadn’t been removed properly. I’ve now removed it from linear_model.rst and pushed the changes. Apologies for the oversight earlier, and thank you again for the review and guidance!

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.

Add links to examples from the docstrings and user guide
2 participants