Simply EEGLAB

How much data ICA needs

Station 4 · Lesson 2 · EEGLAB 2026.1

In the GUI

  1. Channels per frame
  2. Frames per epochEpochs
  3. Sampling rate (Hz)

Script

nComp   = EEG.nbchan - numel(badChans) - 1;   % expected rank after average reference
nPoints = EEG.pnts * EEG.trials;
fprintf('Data points per channel: %d\n', nPoints);
fprintf('Recording length: %.2f min\n', nPoints / EEG.srate / 60);
fprintf('Points per weight, %d channels: %.1f\n', EEG.nbchan, nPoints / EEG.nbchan^2);
fprintf('Points per weight, %d components: %.1f\n', nComp, nPoints / nComp^2);
k = 30;
for N = [32 64 128 256]
    fprintf('%3d components: at least %.1f min\n', N, k * N^2 / EEG.srate / 60);
end

Which value should I choose?

ComponentsWeights (N²)Data points (k = 30)Minutes at 250 HzMinutes at 128 Hz
321024307202.04.0
6440961228808.216.0
1281638449152032.864.0
256655361966080131.1256.0
CaseWhat to doWhy
Average reference or interpolated channelsComponents = channels − interpolated − 1The data rank is lower, as in the Running ICA lesson.
The recording is too short for all componentsReduce the number with 'pca', for example 'pca', 20Fewer components need fewer data points.
Enough data and full rankDo not reduceOfficial tutorial: PCA slightly corrupts the data, so the full-rank data are better whenever possible.

Check

  • You know your numbers
  • Points per weight
  • The decision is written down

For your Methods

The ICA training data comprised [30504] samples per channel ([3.97] min at 128 Hz), giving [31.7] data points per unmixing weight for [31] components.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/ica-data-requirements/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.