Station 4 · Lesson 7
AMICA & Picard
eeglab_data.set (D1) · Already applied: High-pass & low-pass filtering, Removing line noise (50/60 Hz), Bad channels, Channel interpolation, Re-referencingDownload the data (opens in a new tab)Script to reach this state
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
eeglabRoot = fileparts(which('eeglab'));
EEG = pop_loadset('eeglab_data.set', fullfile(eeglabRoot, 'sample_data'));
fullLocs = EEG.chanlocs;
% Main dataset: high-pass at 0.1 Hz, then 60 Hz line-noise removal
EEG = pop_eegfiltnew(EEG, 'locutoff', 0.1);
EEG = pop_eegfiltnew(EEG, 'locutoff', 58, 'hicutoff', 62, 'revfilt', 1);
% Bad channels you removed earlier, e.g. {'T7'}; leave empty if none
badChans = {};
if ~isempty(badChans)
EEG = pop_select(EEG, 'rmchannel', badChans);
EEG = pop_interp(EEG, fullLocs, 'spherical');
end
% Average reference, EOG channels excluded
eogIdx = find(ismember({EEG.chanlocs.labels}, {'EOG1', 'EOG2'}));
EEG = pop_reref(EEG, [], 'exclude', eogIdx);
EEG.filename = ''; EEG.filepath = ''; EEG.datfile = ''; EEG.saved = 'no';
[ALLEEG, EEG, CURRENTSET] = pop_newset(ALLEEG, EEG, 0, 'setname', 'D1 main', 'gui', 'off');
eeglab redraw;Your browser's back button takes you to the exact place you were, so open anything you like.
The idea in brief
runica, extended Infomax, is the default ICAA method that separates the recording into independent sources, some brain and some artifact. in EEGLAB and the one on our path. It is not the only choice. Two other algorithms appear often in EEGA recording of the brain's electrical activity from electrodes on the scalp. papers:
Before and after
Image coming soon.
Two rows of scalp maps from D1, the first 10 ICA components of the same 1 Hz copy: the top row from runica, the bottom row from Picard in Infomax mode. The eye component is visible in both rows, possibly at a different position or with flipped colours. Same colormap and scale in both rows. Source: the figures from this lesson’s script.
Your next questions, each answered in its own section:
Why do I need this step?
The reasons in detail, and the terms you need
- AMICA: EEGLAB lists it in the ICA window as AMICA (slowest; best). It can learn more than one ICA model for the same data.
- Picard: a faster way to reach an Infomax or FastICA solution. Its Infomax mode is plain Infomax, not the extended Infomax that
runicauses on our path. EEGLAB lists it as Infomax picard.m and FastICA picard.m (fastest).
Both are extensions. The ICA window shows an algorithm only when its function exists on your computer, so AMICA and Picard appear in the list only after you install them.
This lesson is optional. Everything else in the roadmap works with runica.
Why do I need this step?
- AMICA: EEGLAB lists it in the ICA window as AMICA (slowest; best). It can learn more than one ICA model for the same data.
- Picard: a faster way to reach an Infomax or FastICA solution. Its Infomax mode is plain Infomax, not the extended Infomax that
runicauses on our path. EEGLAB lists it as Infomax picard.m and FastICA picard.m (fastest).
Both are extensions. The ICA window shows an algorithm only when its function exists on your computer, so AMICA and Picard appear in the list only after you install them.
This lesson is optional. Everything else in the roadmap works with runica.
How do I do it in EEGLAB?
9 steps in the menus
Start with the main datasetOne EEG data file loaded in EEGLAB together with its information. D1 main loaded, as in the Starting point.
First: install an pluginA package that adds new functions or menus to EEGLAB.
- Open File then Manage EEGLAB extensions.
- Search for
picard, or forAMICA, select it, and install it. Restart EEGLAB if it asks you to.
Second: Picard from the ICA window
- Make an ICA copy filtered at 1 Hz, as in the Running ICA lesson.
- Open Tools then Decompose data by ICA. In ICA algorithm to use (click to select), choose Infomax picard.m. The Commandline options (See help messages) field shows
'maxiter', 500, 'mode', 'standard'. - Add the rankThe number of truly independent channels; it drops after interpolation or average reference. to the options yourself:
'maxiter', 500, 'mode', 'standard', 'pca', 31in D1. With Picard,pop_runicadoes not check the rank for you. - Press OK, then compare the maps from Plot then Component maps then In 2-D with those from
runica.
Third (optional): AMICA
- After installing AMICA, open Tools then Run AMICA on the ICA copy.
- Make sure the In File: field is empty. If it shows
eeglab_data.fdt, clear it, or AMICA reads the original data from disk instead of the ICA copy. Set # PCA Dims.: to the expected rank, 31 in D1, and choose an output folder you can find. - AMICA takes much longer than
runica. Leave it running and compare the maps when it finishes.
Whichever algorithm you use, copy the weights to the main dataset the same way as in the 1-Hz filteringApplying a filter to the data. lesson.
How do I do it in EEGLAB?
Start with the main dataset D1 main loaded, as in the Starting point.
First: install an extension
- Open File then Manage EEGLAB extensions.
- Search for
picard, or forAMICA, select it, and install it. Restart EEGLAB if it asks you to.
Second: Picard from the ICA window
- Make an ICA copy filtered at 1 Hz, as in the Running ICA lesson.
- Open Tools then Decompose data by ICA. In ICA algorithm to use (click to select), choose Infomax picard.m. The Commandline options (See help messages) field shows
'maxiter', 500, 'mode', 'standard'. - Add the rank to the options yourself:
'maxiter', 500, 'mode', 'standard', 'pca', 31in D1. With Picard,pop_runicadoes not check the rank for you. - Press OK, then compare the maps from Plot then Component maps then In 2-D with those from
runica.
Third (optional): AMICA
- After installing AMICA, open Tools then Run AMICA on the ICA copy.
- Make sure the In File: field is empty. If it shows
eeglab_data.fdt, clear it, or AMICA reads the original data from disk instead of the ICA copy. Set # PCA Dims.: to the expected rank, 31 in D1, and choose an output folder you can find. - AMICA takes much longer than
runica. Leave it running and compare the maps when it finishes.
Whichever algorithm you use, copy the weights to the main dataset the same way as in the 1-Hz filtering lesson.
How do I write it as code?
The same steps in 19 lines of MATLAB
% The same ICA copy, decomposed by runica and by Picard (Infomax mode)
EEG_ica = pop_eegfiltnew(EEG, 'locutoff', 1);
expectedRank = EEG_ica.nbchan - numel(badChans) - 1;
tic;
EEG_runica = pop_runica(EEG_ica, 'icatype', 'runica', 'extended', 1);
tRunica = toc;
% pop_runica does not reduce the rank for Picard, so pass 'pca' yourself
tic;
EEG_picard = pop_runica(EEG_ica, 'icatype', 'picard', 'maxiter', 500, ...
'mode', 'standard', 'pca', expectedRank);
tPicard = toc;
fprintf('runica: %.0f s, %d components\n', tRunica, size(EEG_runica.icaweights, 1));
fprintf('Picard: %.0f s, %d components\n', tPicard, size(EEG_picard.icaweights, 1));
% First 10 scalp maps of each, to compare by eye
pop_topoplot(EEG_runica, 0, 1:10);
pop_topoplot(EEG_picard, 0, 1:10);
% AMICA, after installing the AMICA extension; it also needs the rank
% EEG_ica.datfile = ''; % AMICA must use the filtered data in memory, not eeglab_data.fdt on disk
% EEG_amica = pop_runamica(EEG_ica, 'pcakeep', expectedRank, 'outdir', fullfile(pwd, 'amicaout'));The scriptA MATLAB file of commands that runs processing steps in order. times runica and Picard on the same copy and prints the number of components of each: 31 in D1 for both. The AMICA line is a comment, because it runs only after you install the extension.
How do I write it as code?
% The same ICA copy, decomposed by runica and by Picard (Infomax mode)
EEG_ica = pop_eegfiltnew(EEG, 'locutoff', 1);
expectedRank = EEG_ica.nbchan - numel(badChans) - 1;
tic;
EEG_runica = pop_runica(EEG_ica, 'icatype', 'runica', 'extended', 1);
tRunica = toc;
% pop_runica does not reduce the rank for Picard, so pass 'pca' yourself
tic;
EEG_picard = pop_runica(EEG_ica, 'icatype', 'picard', 'maxiter', 500, ...
'mode', 'standard', 'pca', expectedRank);
tPicard = toc;
fprintf('runica: %.0f s, %d components\n', tRunica, size(EEG_runica.icaweights, 1));
fprintf('Picard: %.0f s, %d components\n', tPicard, size(EEG_picard.icaweights, 1));
% First 10 scalp maps of each, to compare by eye
pop_topoplot(EEG_runica, 0, 1:10);
pop_topoplot(EEG_picard, 0, 1:10);
% AMICA, after installing the AMICA extension; it also needs the rank
% EEG_ica.datfile = ''; % AMICA must use the filtered data in memory, not eeglab_data.fdt on disk
% EEG_amica = pop_runamica(EEG_ica, 'pcakeep', expectedRank, 'outdir', fullfile(pwd, 'amicaout'));The script times runica and Picard on the same copy and prints the number of components of each: 31 in D1 for both. The AMICA line is a comment, because it runs only after you install the extension.
Which value should I choose?
Suitable values for your analysis goal
| runica (extended Infomax) | Picard | AMICA | |
|---|---|---|---|
| Comes with EEGLAB | Yes, the default | No, an extension | No, an extension |
| Speed, as EEGLAB labels it | The default | FastICA picard.m (fastest) | AMICA (slowest; best) |
| What it gives | One ICA model | A plain Infomax (not extended) or FastICA solution, reached faster | One or more ICA models |
| Rank | pop_runica tries to detect it | Pass 'pca' yourself | Set the number of components to keep yourself |
| When to choose it | Most studies, and everything on this roadmap | Many datasets, or many channels, when time matters | When you want the slowest, most careful decompositionBreaking the data down into a set of ICA components. and have the time |
Changing the algorithm does not change the rest of the path.
ICLabelA tool that classifies each ICA component into seven classes with a probability for each., removing components, and copying the weights work the same way with any of the three.
Changing the algorithm does not change the rest of the path.
ICLabelA tool that classifies each ICA component into seven classes with a probability for each., removing components, and copying the weights work the same way with any of the three.
Which value should I choose?
| runica (extended Infomax) | Picard | AMICA | |
|---|---|---|---|
| Comes with EEGLAB | Yes, the default | No, an extension | No, an extension |
| Speed, as EEGLAB labels it | The default | FastICA picard.m (fastest) | AMICA (slowest; best) |
| What it gives | One ICA model | A plain Infomax (not extended) or FastICA solution, reached faster | One or more ICA models |
| Rank | pop_runica tries to detect it | Pass 'pca' yourself | Set the number of components to keep yourself |
| When to choose it | Most studies, and everything on this roadmap | Many datasets, or many channels, when time matters | When you want the slowest, most careful decomposition and have the time |
Changing the algorithm does not change the rest of the path.
ICLabel, removing components, and copying the weights work the same way with any of the three.
Changing the algorithm does not change the rest of the path.
ICLabel, removing components, and copying the weights work the same way with any of the three.
How do I check it worked?
4 quick checks
- The algorithm appears in ICA algorithm to use (click to select) after you install it.
- The number of components is the expected rank: 31 in D1 for each algorithm.
- The maps are similar: the eye component appears in both decompositions, possibly at another position.
- You noted the time of each algorithm on your computer, from the script.
How do I check it worked?
- The algorithm appears in ICA algorithm to use (click to select) after you install it.
- The number of components is the expected rank: 31 in D1 for each algorithm.
- The maps are similar: the eye component appears in both decompositions, possibly at another position.
- You noted the time of each algorithm on your computer, from the script.
What mistakes do people make?
5 mistakes and how to avoid them
- Looking for the algorithm before installing it. The list in Tools then Decompose data by ICA hides any algorithm whose function is not installed.
- Forgetting the rank with Picard or AMICA. The automatic rank check in
pop_runicabelongs torunica. With the other two, set the number of components yourself. - Expecting identical components. Different algorithms, and even two runs of
runica, give components in a different order and sign. Compare them by shape. - AMICA reading the file on disk. If the dataset is linked to a
.fdtfile, AMICA reads that file, not the filtered data in memory. Empty In File:, or setEEG.datfile = ''in a script. - Mixing algorithms within one STUDYAn EEGLAB structure that groups many participants' datasets for joint analysis.. Use the same algorithm and settings for every participantThe person whose data were recorded in the study., and write them in Methods.
What mistakes do people make?
- Looking for the algorithm before installing it. The list in Tools then Decompose data by ICA hides any algorithm whose function is not installed.
- Forgetting the rank with Picard or AMICA. The automatic rank check in
pop_runicabelongs torunica. With the other two, set the number of components yourself. - Expecting identical components. Different algorithms, and even two runs of
runica, give components in a different order and sign. Compare them by shape. - AMICA reading the file on disk. If the dataset is linked to a
.fdtfile, AMICA reads that file, not the filtered data in memory. Empty In File:, or setEEG.datfile = ''in a script. - Mixing algorithms within one study. Use the same algorithm and settings for every participant, and write them in Methods.
Your browser doesn't allow saving progress. All lessons are open, but completion marks won't be saved.
Done. Your progress is saved in this browser.UndoHow do I write it in my paper?
A Methods template: edit the data, settings and versions to match what you ran
A template: edit the data, settings and versions to match what you ran.
Independent component analysis was computed with Picard (Infomax mode, maximum 500 iterations; picard plugin [version], EEGLAB 2026.1; [31] components after PCA reduction to the data rank) on a copy of the data high-pass filtered at 1 Hz, and the resulting weights were applied to the 0.1 Hz high-pass filtered data.How do I write it in my paper?
A template: edit the data, settings and versions to match what you ran.
Independent component analysis was computed with Picard (Infomax mode, maximum 500 iterations; picard plugin [version], EEGLAB 2026.1; [31] components after PCA reduction to the data rank) on a copy of the data high-pass filtered at 1 Hz, and the resulting weights were applied to the 0.1 Hz high-pass filtered data.Where can I read more?
3 sources, official docs first
- EEGLAB pluginDocumentationAMICA
- PicardPicard
- Makoto's preprocessing pipeline§13.7 Unofficial instruction to install and use AMICA; §18.8 What does AMICA do?
Written for EEGLAB 2026.1 · 2026-10-28
Going further
- EEGLAB plugin: https://eeglab.org/plugins/amica/ (AMICA)
- Picard: https://github.com/pierreablin/picard (Picard)
- Makoto's preprocessing pipeline: https://eeglab.ucsd.edu/wiki/Makoto%27s_preprocessing_pipeline (§13.7 Unofficial instruction to install and use AMICA; §18.8 What does AMICA do?)
Need help?
Ask, share feedback, or report an error
- Report a scientific error · Needs a GitHub account. Don't have one? Use "Share your thoughts".