ICA arguments confusion
See original GitHub issueThe ICA
object takes three arguments that are somehow related to the number of components:
n_components
max_pca_components
n_pca_components
Every time I use ICA in MNE I get confused. Why are there three seemingly related arguments? The only thing I ever needed to do is to reduce the number of PCA components prior to ICA (e.g. for average-referenced data the number of PCA components should be set to the number of channels minus one). Now since PCA is the first step in any ICA algorithm, I thought that n_components
would set this value. But from the docs, it looks like this is really done by max_pca_components
- or is it? And when do I need n_pca_components
? I’m curious which use cases require these three arguments.
BTW, both EEGLAB’s runica
and scikit-learn’s FastICA
functions/objects only have n_components
arguments.
Related to this question: what does the noise_cov
argument do? Is the purpose to whiten the data if noise_cov
is some covariance matrix or not whiten (i.e. only decorrelate) if noise_cov=None
? If so, wouldn’t it make more sense to introduce a boolean whiten
argument instead? Here, it seems like MNE’s ICA does not whiten by default, whereas EEGLAB and scikit-learn do whiten by default.
Issue Analytics
- State:
- Created 6 years ago
- Comments:80 (79 by maintainers)
Top GitHub Comments
OK, done so (my first one 😉: #5620
Hi, I have just made some comments to this #5114 docstring commit, after having dived through the ICA code the whole day in order to get a more profound understanding of what is going on with the different component-settings. What actually provoked this undertaking were two mistakes in the specification of the pca_components_-shape in the doc.
@cbrnr, maybe you could review and consider it? See here: https://github.com/mne-tools/mne-python/commit/1a09859c6e5a7749b25a6c78403c0f02b225f0f5 (I am not sure, if this is the right way to contribute anything to this issue; if not, please let me know the most proper way.)