Repository navigation
DOC improve User Guide on Linear Models - intro and OLS - #35215
Conversation
cakedev0
left a comment
There was a problem hiding this comment.
Thanks! This is a good improvement I think 👍
Some nits below, but overall LGTM.
|
@virchan @lucyleeow Are you interested in this one? |
lucyleeow
left a comment
There was a problem hiding this comment.
Thanks for the ping, this was a nice read and some very nice improvements! Some nits only.
|
|
||
| such that it includes the intercept :math:`w_0`. You might also think of :math:`X` as | ||
| the data matrix extended by a column of ones. In the implementation, scikit-learn | ||
| tries to avoid as much as possible to build this extended matrix explicitly. |
There was a problem hiding this comment.
My naive understanding for why we avoid building the extended matrix explicitly is for speed/memory and it does not make sense to include intercepts in regularization.
(If that's on the right track) Maybe we could link the ideas more directly (e.g., we don't build the extended matrix because....)?
There was a problem hiding this comment.
This sentence was also unclear to me. Us not building the extended matrix "explicitly" could also be interpreted as we do use it, but implicitly, which my agent says is in fact done by centering. What about mentioning centering here as the approach taken in most cases and why it is used instead of the intercept column?
There was a problem hiding this comment.
I added "which would more than double the memory consumption".
Hint: The centering trick does not work for LogisticRegression and other GLMs (only for OLS, Ridge, Lasso, ..).
todo: move [sklearn#35216](scikit-learn/scikit-learn#35216) from Now to Waiting, the test was already there, approved by lesteve with auto-merge add: Trees: get [sklearn#34554](scikit-learn/scikit-learn#34554) merged (recursion PDP on categorical features; approved) add: Threads: review [sklearn#34729](scikit-learn/scikit-learn#34729) (inference methods don't modify the estimator; ev-br on the SplineTransformer mutation) todo: lucyleeow approved [sklearn#35215](scikit-learn/scikit-learn#35215) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@lorentzenchr happy for me to merge now? |
In scikit-learn, it is habit that a reviewer merges. |
Reference Issues/PRs
Contributes to #33537.
What does this implement/fix? Explain your changes.
This PR improves the user guide on linear models:
AI usage disclosure
I used AI assistance for:
Any other comments?