ideal length of epochs + Ideal number of components for ICA

Hi everyone,

We collected eeg data (resting-state data) on patients with severe traumatic brain injury and we want to pre-process these data in order to do some connectivity analysis later.

Our system is an egi with 128 channels, and our pipeline to pre-process is the following:

  1. Drop bad channels (mainly we drop around 5 to 10 channels)
  2. Transform raw data into epochs (we are actually making epochs of 10 sec)
  3. Drop bad epochs (mainly we drop around 5 to 10 epochs)
  4. Run ICA (we are actually using 15 components)
  5. Average reference data

2 questions:

What is the ideal length of epochs ?

And how many components would you suggest regarding our system ?

Thanks a lot in advance for your help,


Regarding the number of epochs, ICA completely disregards epoch (and even time) structure in your data. The only thing that matters is the total number of points you provide. In general, it is best to use as much data as possible, but in practice this is of course not possible. As a rule of thumb, for N stable components you need at least k N^2 points for each channel, where N is the number of channels and k is a multiplier which depends on (and increases with) N (see Indep. Comp. Analysis - EEGLAB Wiki for more details).

Besides ICA, the ideal epoch length for artifact removal depends on what you want – usually, I would not use very long epochs, because a short artifact would drop the entire epoch. In my experience, 1–2 s epochs for artifact rejection are often used.

You did not mention if you use ICA to remove artifacts (and then stay in channel space) or if you select brain components and perform the rest of your analysis in source space, so I’m not sure I understand your second question. In the former case, you only really expect 2–3 components representing ocular activity, so you might get away with a lower number of data points.

I’d want to add that I still believe using only 15 components is a little bit low given that you have >100 channels (as I deducted from your other posting). For EEG I always try to use n_components equal to the rank of the data, but then again I usually work with ~64 electrode setups. But I would suggest to at least double or even quadruple the number of components you’re using (i.e., increase it to 60) and check if that changes (improves) the decomposition. Otherwise I’d be very worried to remove too much “brain signal” when rejecting a component.

1 Like

And another thing I’d like to add:

When I earlier asked why you didn’t epoch your data, I did not mean to convince you to do it :slight_smile: I just wanted to understand the nature of your data & analysis better. It’s entirely fine not to epoch for ICA.

1 Like