Skip to content

EHN Support unit-variance whitening for FastICA - #19490

Merged
glemaitre merged 65 commits into
scikit-learn:mainfrom
jjerphan:bug-13056
Nov 8, 2021
Merged

glemaitre merged 65 commits into
scikit-learn:mainfrom
jjerphan:bug-13056

Conversation

@jjerphan

@jjerphan jjerphan commented Feb 18, 2021 •

Copy link
Copy Markdown
Member

Reference Issues/PRs

Supersedes #13096
Fixes #13056

What does this implement/fix? Explain your changes.

FastICA has an implementation peculiarity: usually, ICA whitening variance is unitary but the current implementation of FastICA works with an arbitrary variance for whitening.

This PR:

  • adds the possibility to use unit variance for whitening in FastICA using whiten='unit-variance'
  • adds the possibility to use arbitrary variance for whitening in FastICA using whiten='arbitrary-variance' (the current behaviour)
  • add a deprecation cycle for whiten

Any other comments?

Currently adapting the PR to address @jnothman's specs:


  • FastICA():
    • Warn "From version 0.25 whiten='unit-variance' by default" if variance != 1
    • Compute as in master
  • FastICA(whiten=True):
    • Warn "From version 0.25 whiten=True should be specified as whiten='arbitrary-variance' (its current behaviour) or whiten='unit-variance'."
    • compute as in master
  • FastICA(whiten='unit-variance'):
    • no warning
    • compute with unit variance
  • FastICA(whiten='arbitrary-variance'):
    • no warning
    • compute as in master

@jjerphan jjerphan changed the title EHN Support unit-variance whitening for FastICA [WIP] EHN Support unit-variance whitening for FastICA Feb 18, 2021
jjerphan and others added 6 commits November 4, 2021 17:08
@jjerphan
jjerphan requested a review from ogrisel November 4, 2021 17:08
Comment thread sklearn/decomposition/_fastica.py Resolved

@ogrisel ogrisel 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.

I put some comments above, but other than that LGTM!

jjerphan and others added 2 commits November 5, 2021 13:53
Co-authored-by: Olivier Grisel <[email protected]>
@jjerphan

jjerphan commented Nov 5, 2021

Copy link
Copy Markdown
Member Author

The sole failing test in the CI is unrelated to those changes.

@jjerphan
jjerphan requested a review from glemaitre November 7, 2021 20:19
Comment thread doc/whats_new/v1.1.rst Resolved
Co-authored-by: Guillaume Lemaitre <[email protected]>
@jjerphan
jjerphan requested a review from glemaitre November 8, 2021 11:02
@glemaitre
glemaitre merged commit c48dba0 into scikit-learn:main Nov 8, 2021
@jjerphan
jjerphan deleted the bug-13056 branch November 8, 2021 14:49
@jjerphan

jjerphan commented Nov 9, 2021

Copy link
Copy Markdown
Member Author

I made myself suffer too with this PR. 😄

@jjerphan
jjerphan restored the bug-13056 branch November 9, 2021 17:18
@jjerphan
jjerphan deleted the bug-13056 branch November 9, 2021 17:18
@jjerphan
jjerphan restored the bug-13056 branch November 9, 2021 17:19
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Nov 29, 2021
Co-authored-by: Facundo Ferrín <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
Co-authored-by: Facundo Ferrín <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FastICA whitening problem (Bug)

5 participants