Skip to content

DOC improve User Guide on Linear Models - Ridge - #35219

Merged
virchan merged 8 commits into
scikit-learn:mainfrom
lorentzenchr:ug_linear_models_ridge
Nov 5, 2026
Merged

virchan merged 8 commits into
scikit-learn:mainfrom
lorentzenchr:ug_linear_models_ridge

Conversation

@lorentzenchr

Copy link
Copy Markdown
Member

Reference Issues/PRs

Contributes to #33537.

What does this implement/fix? Explain your changes.

This PR improves the user guide on linear models:

  • Ridge

AI usage disclosure

None

Any other comments?

@lorentzenchr
lorentzenchr force-pushed the ug_linear_models_ridge branch 2 times, most recently from decbeed to 2e38107 Compare October 25, 2026 21:08
@DeaMariaLeon

Copy link
Copy Markdown
Member

Thanks for improving the explanations.

FYI: hiding content is not good for accessibility (to read the example and the formula, one has to click the disclosure icon).

Here is what the WAVE website report says about that:

"ARIA hidden
What It Means: Content is hidden with ARIA.
Why It Matters: Content hidden with aria-hidden="true" is not presented to screen reader users.
What To Do: Ensure the content is intended to be hidden from screen reader users. The hidden content must not contain any navigable elements (such as links or form controls).
The Algorithm... in English
An element with aria-hidden="true" is present."

Some people in scikit-learn care about accessibility, and some people don't. The website has other issues anyway.
So, like I said, it's just for information in case you wanted to always show the content. But it's up to you.

@lorentzenchr

Copy link
Copy Markdown
Member Author

I think it is better to hide information that is otherwise overwhelmingly detailed and distracts the flow of reading. The weighted objective, for instance, is not explained anywhere else, but is quite a niche therefore hidden. (You can compare to the section "logistic regression" where it is not yet hidden.)

@lorentzenchr
lorentzenchr force-pushed the ug_linear_models_ridge branch from 2e38107 to 55adbf9 Compare November 2, 2026 17:28
@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Nov 2, 2026
@lorentzenchr
lorentzenchr force-pushed the ug_linear_models_ridge branch from 55adbf9 to 6062e7f Compare November 2, 2026 17:31
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Nov 2, 2026
@lorentzenchr

Copy link
Copy Markdown
Member Author

@lucyleeow @StefanieSenger As you seem to have enjoyed #35215, you might also like to read this PR.

@lucyleeow lucyleeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again an interesting read, nits only.

Comment thread doc/modules/linear_model.rst Resolved
Comment on lines +126 to +129
If distances of cities of a country (in meters, typically several thousands) and
travel times between cities (in hours, typically smaller 24) have similar effect on
the target, Ridge will tend to shrink the travel time coefficient more when the
features are unstandardized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a nice example.

Comment thread doc/modules/linear_model.rst Resolved
Comment thread doc/modules/linear_model.rst Resolved
Comment thread doc/modules/linear_model.rst Resolved
Comment thread doc/modules/linear_model.rst Resolved
@lucyleeow lucyleeow added the Waiting for Second Reviewer First reviewer is done, need a second one! label Nov 5, 2026

@virchan virchan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM as well! Thanks everyone for your time!

Merging.

@virchan
virchan merged commit 559585e into scikit-learn:main Nov 5, 2026
43 checks passed
@lorentzenchr
lorentzenchr deleted the ug_linear_models_ridge branch November 5, 2026 16:19
@Tariolle Tariolle mentioned this pull request Dec 2, 2026
13 of 55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation size/M Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants