Skip to content

mne.preprocessing.ICA - components parameters #5054

Closed

Description

@sappelhoff

I have a question concerning the "component parameters" in ICA, which are n_components, max_pca_components, and n_pca_components. What exactly do they do?

I understand that an ICA of say 64-channel EEG data will usually yield a W of size 64. From my current knowledge the ways how to end up with W of a lower size would be:

  1. to perform a dimension reduction with PCA prior to ICA application
  2. to "subsample" the sensor space, that is, drop some channels and apply only this subset to ICA

Now the three mentioned parameters to the ICA object are confusing me a bit.

  • max_pca_components --> this is probably corresponding to my point 1), a dimension reduction and it will select the n components of the PCA that explain the most of the variance (or all components).

If that is true, what is n_components doing?

Lastly, what is n_pca_components doing? It says that it is:

The number of PCA components used after ICA recomposition.

... but why would any PCA components be of relevance after I already back-projected my ICA (I assume that is what is meant by recomposition)? Does this parameter perhaps have something to do with the problem that is mentioned in the recent paper that warns about performing dimension reduction prior to ICA?

Activity

  1. agramfort commented on Mar 29, 2018

    @agramfort
    SponsorMember

    for @cbrnr :)

  2. cbrnr commented on Mar 29, 2018

    @cbrnr
    Contributor

    @sappelhoff I completely agree that these arguments are confusing - for an ongoing discussion please see #4856. Here's the tl;dr:

    • n_components and max_pca_components both perform dimensionality reduction via PCA prior to ICA. The only difference between these two arguments is the shape of the returned PCA components matrix (with n_components you get all components, whereas with max_pca_components you get only the selected components, i.e. rows, in this matrix). For the user, I'd recommend to use n_components.
    • You are right that n_pca_components is used in back-projecting. I still haven't figured out why exactly this argument is necessary.

    We haven't finished our discussion in #4856 (feel free to participate), but at the very least, we will clarify these arguments in the docs and contrast them to equivalent EEGLAB arguments.

  3. sappelhoff commented on Mar 29, 2018

    @sappelhoff
    MemberAuthor

    thanks for the reference, @cbrnr!

    Now my current understanding is:

    1. calculate PCA on data X
    2. retain max_pca_components and project X to X_reduced
    3. at this point, probably n_components is doing something ... but what?
    4. Using X_reduced, we compute an ICA and have X_reduced_ica
    5. From X_reduced_ica, we retain/reject components
    6. We back-project X_reduced_ica using the ICA weights and have X_reduced'
      • ( the ' indicating that some components were rejected in the ICA ... but the dimensions are the same)
    7. X_reduced' can now be back-projected to X' using the PCA weights of dimension max_pca_components
      • (It would be X' instead of the original X because of two reasons: (a) some ICA components were missing (rejected) to get the same X_reduced and (b) X_reduced does not contain all pca components so we cannot recover all the data)
    8. Here, at step 7., n_pca_components comes into play by using more than just max_pca_components to construct X' from X_reduced'

    Is my intuition about the procedure correct? Given that yes, ... are there any references that suggest that step 8. (concerning max_pca_components) is sensible? And I still don't know what n_components is doing ... but for now, I will not do any dimension reduction anyway and leave the arguments at None.

    However, given the discussion in #4856 and this paper that I also linked above, maybe we should include a warning that performing dimensionality reduction (even only by 1% variance) before ICA can lead to unreliable results? That information might fit well next to the warning note about filters ... ?

  4. cbrnr commented on Mar 29, 2018

    @cbrnr
    Contributor

    I'm not sure if your intuition is correct, this is exactly what I was trying to find out as well 😄. To avoid discussing this in two places, could you please comment in #4856 (and @agramfort you could close this issue then)?

    Regarding the warning, we could include a note with a link to that paper, but there is one use case where you should reduce dimensionality, namely if you have rank-deficient data such as after average reference. In this case, it is strongly recommended to reduce dimensionality by 1, otherwise ICA might not work optimally if it doesn't detect this situation (see here). The note would have to take this into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions