8000 FIX Fixes regression in CCA by thomasjpfan · Pull Request #19646 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

FIX Fixes regression in CCA #19646

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

Merged
merged 8 commits into from
Apr 22, 2021
Merged

FIX Fixes regression in CCA #19646

merged 8 commits into from
Apr 22, 2021

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #19549

What does this implement/fix? Explain your changes.

The regression was introduced in #18746. The original implementation depended on a previous version of pinv2 that was changed in scipy/scipy#10067, this PR pulls in the old version of pinv2. For now I am not considering _pinv2_old a "utils.fixes" because it is not a "fix" that we would remove in the future.

Any other comments?

It would be nice to have a non-regression test for this. So far I tested this on the dataset provided here: #19549 (comment)

@jnothman jnothman modified the milestones: 0.24.1, 0.24, 0.24.2 Mar 8, 2021
Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

It would be nice to have a non-regression test for this. So far I tested this on the dataset provided here: #19549 (comment)

I agree it would be great to have a non-regression test that is sensitive to cond parameter of pinv2 to make sure that we do not break this again in the future.

@ogrisel
Copy link
Member
ogrisel commented Mar 15, 2021

For now I am not considering _pinv2_old a "utils.fixes" because it is not a "fix" that we would remove in the future.

Actually we could probably find a way to rewrite it as a fix that we would use in the future:

Backport the scipy 1.3+ version of pinv2 in sklearn.util.fixes (when the installed scipy is < 1.3) and use it with a cond value that does want we want.

Edit or maybe it's not possible to do so without computing the SVD in which case it's pointless...

@ogrisel
Copy link
Member
ogrisel commented Mar 15, 2021

Indeed we need a relative cutoff (which I believe rcond is for but was apparently always broken because it does the same as cond). I added a comment: scipy/scipy#10067 (comment)

@thomasjpfan
Copy link
Member Author

I updated this PR with a non-regression test and moving the whats new to 0.24.2

Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks very much for the non-regression test.

Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @thomasjpfan

@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
@ilayn
Copy link
ilayn commented Apr 24, 2021
A378

Hi all, do you mind having a look at scipy/scipy#13831 and let me know if I'm missing anything else for your needs ?

This will first provide atol and rtol possibilities and then long overdue pinv2 deprecation cycle will start. Since I've caused so much annoyance which I apologize once again, I guess you should be the first premium customer of the feature 😃

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.

CCA Issues from 0.23.2 -> 0.24.1
6 participants
0