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.

I don’t understand some choices in the ICA calculation process, maybe someone could answer these questions:

  1. Why is a so-called pre-whitener (by default channels are divided by their standard deviations) used before PCA/ICA? I think this is not necessary because the next step is PCA with whiten=True.
  2. Speaking of PCA and whitening, sphering seems to be more optimal for ICA, and sphering is also used in EEGLAB by default. AFAIK the only change necessary would be another rotation by the eigenvector matrix to convert the PCA whitening transform to a sphering transform. Should we care to implement it?
  3. I don’t understand this line - why are the elements of the unmixing matrix divided by the square root of the explained variances?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:41 (41 by maintainers)

github_iconTop GitHub Comments

1reaction
cbrnrcommented, Jan 30, 2018

Oh yes, this is definitely nice but hacky (i.e. no one without some experience with MNE will be able to come up with it in less than 5 minutes).

+100 for exposing the remaining parts, this is still my preferred option. I propose the following components:

  • ica.unmixing_matrix_ (already exists)
  • ica.pca_components_ (already exists)
  • ica.standardization_ (removes mean and scales variance to 1) - but we have to think about how the noise_cov argument influences this pre-whitening to return the right thing
  • ica.whitening_

Then the docs should say that the final unmixing matrix, which transforms the MEEG data into sources, can be composed as ica.unmixing_matrix_ @ ica.whitening_ @ ica.pca_components_ @ ica.standardization_ (ignoring any necessary transpose operation or dimensionality rectification right now).

1reaction
cbrnrcommented, Jan 22, 2018

to do this you need W to be the inverse of a square root of cov(X). Let’s call the svd of this covariance U S^2 U^T then W can be S^{-1} U^T or U S^{-1} U^T. What you call (I think) sphering is U S^{-1} U^T and whitening S^{-1} U^T but they are just 2 choices to whiten the data.

Yes, the terminology seems to be inconsistent. Whitening is a transform that decorrelates the data (i.e. the covariance matrix becomes the identity matrix), e.g. via PCA. There are infinitely many ways to whiten due to rotation. Sphering is a special kind of whitening that rotates the data back to the original space (some call that ZCA). So exactly like you say, but currently we (and scikit-learn) use PCA whitening, but EEGLAB uses sphering (and I remember having read somewhere that ZCA is more optimal for Infomax than PCA whitening, but I can’t find that anymore).

In any case, since I can’t find relevant references, any kind of whitening seems to work just fine, so if I find more on that topic I’ll create a new issue.

So only the last question left - @dengemann?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strong Interpretive Questions - ICA Associates
What are the positive aspects of this situation? What are the negative aspects of this situation? What might be some of the causes...
Read more >
EXAMPLE QUESTIONS TO ASK YOUR ICA — Emma Ward
What is your biggest struggle when it comes to ______? Please explain what feels challenging about it. ... How much would you be...
Read more >
Exams Past Questions and Suggested Solutions - ICAG
Exams Past Questions and Suggested Solutions. September 2022 Atswa Pass list. August 2022 CA Questions & Solutions. March 2022 Atswa Questions & Solutions....
Read more >
Contact Us - ICA
You may find the answers you need in our website. Try our search box below before contacting us. ... Frequently Asked Questions (FAQs)....
Read more >
ICA 2021 - Frequently Asked Questions
Frequently Asked Questions · How do I register to attend the virtual conference? Registration opened on Wednesday, 13 January 2021 at 12:00 Noon...
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