-
-
Notifications
You must be signed in to change notification settings - Fork 26k
Add user option to use SVD for orthogonalizing the mixing matrix in FastICA #2738
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
Conversation
I'll soon check whether the new options improve estimation in a few applications of mine. For the PR this should not be relevant though. |
Just want to pull your attention to the following observation nilearn/nilearn#152, discussing a similar case, but in which we have opted to change from the |
Base on the fact that numpy compiled with lapack_lite will generate
To check if numpy is compiled with lapack_lite, you can try to import |
@GaelVaroquaux +1 for your proposal. However, to fully embrace not adding a new option I first need to see some down-stream improvements in analyses. On the other hand, we can still add the option later if it turns out relevant. |
For the original poster, it lead to an improvement. |
Then let's add it for now. Probably it's a good bet and I'll be happy too. If not I'll report + propose changes. |
@GaelVaroquaux @agramfort |
what is the status on this? |
is the improvement significant? what's the gain? |
I see that FastICA now had a |
yes. thanks @haiatn for chasing outdated PRs and thanks @alimuldal for your effort here. |
It seems that the current eigendecomposition-based method for orthogonalizing the mixing matrix in
sklearn.decomp.fastica
is less numerically stable and produces a less orthogonal output than using a different SVD-based strategy. In some cases, the original method yields NaNs in the result, resulting in aValueError
exception that does not occur with the new SVD-based method. However, there seems to be a trade-off between speed and quality, as the new method is not quite as fast as the original - see the extended discussion in #2735.I've added another boolean keyword argument to
fastica
and to theFastICA
class to enable the use of the SVD-based method rather than the original eigendecomposition-based method.Quality
Speed