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

Skip to content

Conversation

@glemaitre
Copy link
Member

closes #27964

The attribute coef_ of PLSRegression does not take into account the scale of X and thus does not respect the relationship Y = X @ pls.coef_.

The predictions where correct because we applied normalization on X instead of the coefficients.

Now, we just embed both scaling factor of X and Y directly into coef_ that is less surprising and more in line with the documentation.

@github-actions
Copy link

github-actions bot commented Mar 11, 2024

✔️ Linting Passed

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

Generated for commit: 5a936ee. Link to the linter CI: here

@jeremiedbb
Copy link
Member

Since we deprecated normalize from the linear models, wouldn't it make sense to deprecate scale as well in favor of using a pipeline ?

@glemaitre
Copy link
Member Author

The issue here is that we cannot both normalise X and Y in a standardscaler.

@jeremiedbb jeremiedbb added this to the 1.4.2 milestone Mar 21, 2024
Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM

@jeremiedbb jeremiedbb modified the milestones: 1.4.2, 1.5 Apr 5, 2024
@glemaitre
Copy link
Member Author

Let me fix the changelog

@jeremiedbb jeremiedbb added the Waiting for Second Reviewer First reviewer is done, need a second one! label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:cross_decomposition 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.

Correct scale back for PLS regression coefficients

3 participants