question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ICA arguments confusion

See original GitHub issue

The 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:closed
  • Created 6 years ago
  • Comments:80 (79 by maintainers)

github_iconTop GitHub Comments

3reactions
jeythekeycommented, Oct 17, 2018

OK, done so (my first one 😉: #5620

1reaction
jeythekeycommented, Oct 17, 2018

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.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ICA phase distortion - SCCN
Does removing ICA artifact components from an EEG signal corrupt its phase? The answer is a resounding no. We show in this wiki...
Read more >
ICA course on Toponymy - UN Statistics Division
Arguments for abolition of exonyms: Keeping exonyms leads to confusion,. Use of exonyms delays identification of objects,. Why use incorrect/distorted names ...
Read more >
A review of group ICA for fMRI data and ICA for joint inference ...
Independent component analysis (ICA) has become an increasingly utilized approach for analyzing brain imaging data.
Read more >
Emirate of Confusion – jihadica
One of his arguments was that their enemies may be putting forward a rumour in order to monitor the reactions on the jihadi...
Read more >
Clusterwise Independent Component Analysis (C-ICA)
Estimate the C-ICA parameters for each cluster (conditionally upon P ). ... Confusion matrix of the diagnostic labels (AD versus EC; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found