Repository navigation
WIP, ENH: Avoid ICA on rank-deficient data - #8316
Closed
hoechenberger wants to merge 1 commit into
Closed
hoechenberger wants to merge 1 commit into
hoechenberger wants to merge 1 commit into
Conversation
- `ICA.max_pca_components` can now be set to `rank` to use the rank the data. - This is also the new default. The previous default value, ``None``, is still an accepted, but deprecated input. ``None``, too, now dictates to use the rank of the data. Previously, it implied to use the number of channels, which caused problems with rank-deficient data. - If requested number of ICA or PCA components exceeds the rank of the data, we will now raise an exception. - `compute_rank()` and `_estimate_rank_meeg_signals()` have gained a `reg_meg=False` kwarg, to allow rank calculation for MEG reference channels. This was required to make some tests work.
Member
Author
|
Another call with @agramfort … will try yet another approach. Stay tuned ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ICA.max_pca_componentscan now be set torankto limit the number of components to the rank the data.None, is still an accepted, but deprecated.None, too, now dictates to use the rank of the data. Previously, it implied to use the number of channels, which caused problems with rank-deficient data.compute_rank()and_estimate_rank_meeg_signals()have gained aref_meg=Falsekwarg to allow for rank calculation to include MEG reference channels. This was required to make some tests work.Implementing this helped discover a few existing test cases that never converged because they fed rank-deficient data to ICA.
Closes #8313.
I need help:
mne/viz/tests/test_ica.py::test_plot_ica_overlaydoesn't pass because of Accessing data after applying gradient compensation & picking doesn't work #8315mne/preprocessing/tests/test_ica.py::test_ica_full_data_recoverydoesn't pass because the difference between actual and expected test results is too large. It's still rather small but larger than the predefined limits. I have no idea why that is the case, and whether it might be safe to just make the test more lenient or not.