Simply EEGLAB
How much data ICA needs
Station 4 · Lesson 2 · EEGLAB 2026.1
In the GUI
- Channels per frame
- Frames per epochEpochs
- 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);
endWhich value should I choose?
| Components | Weights (N²) | Data points (k = 30) | Minutes at 250 Hz | Minutes at 128 Hz |
|---|---|---|---|---|
| 32 | 1024 | 30720 | 2.0 | 4.0 |
| 64 | 4096 | 122880 | 8.2 | 16.0 |
| 128 | 16384 | 491520 | 32.8 | 64.0 |
| 256 | 65536 | 1966080 | 131.1 | 256.0 |
| Case | What to do | Why | ||
| Average reference or interpolated channels | Components = channels − interpolated − 1 | The data rank is lower, as in the Running ICA lesson. | ||
| The recording is too short for all components | Reduce the number with 'pca', for example 'pca', 20 | Fewer components need fewer data points. | ||
| Enough data and full rank | Do not reduce | Official 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.