WB_EEG_runICA is a tool to run ICA on EEG data based on EEGLAB function - runica(). It perform Independent Component Analysis (ICA) decomposition of input data using the logistic infomax ICA algorithm of Bell & Sejnowski (1995) with the natural gradient feature of Amari, Cichocki & Yang, or optionally the extended-ICA algorithm of Lee, Girolami & Sejnowski, with optional PCA dimension reduction. Annealing based on weight changes is used to automate the separation process. ICA is usually used to remove artifact (e.g. eye blink) or extract features (e.g. ERP) from EEG data.

Parameters

selechanns: number with indices of the selected channels (e.g. ‘[1:4,7:30]’ or ‘all’). Default is ‘all’.

ICs: Number of ICA components. Default is number of EEG channels or number of retained PCs. Noting that we usually run ICA using many more trials that the sample decomposition presented here. As a general rule, finding N stable components (from N-channel data) typically requires more than kN2 data sample points (at each channel), where N2 is the number of weights in the unmixing matrix that ICA is trying to learn and k is a multiplier. The value of k will increase as the number of channels increases. When data are insufficient, then using the ‘pca’ option (Set the number of PCs to retain) to find fewer than N components may be the only good option. This parameter may return strange results. This is because the weight matrix is rectangular instead of being square.

Ntrain : Perform tanh() "extended-ICA" with sign estimation N training blocks. If N > 0, automatically estimate the number of sub-Gaussian sources. If N < 0, fix number of sub-Gaussian comps to -N [faster than N>0] (default is 0 -> off). The "runica" Infomax algorithm can only select for components with a supergaussian activity distribution (i.e., more highly peaked than a Gaussian, something like an inverted T). If there is strong line noise in the data, it is preferable to set the training blocks as 1, so the algorithm can also detect subgaussian sources of activity, such as line current and/or slow activity.

PCs: decompose a principal component (default = [] -> off, i.e. default is NOT performing PCA analysis.) subspace of the data. Value is the number of PCs to retain.

stop: stop training when weight-change < this (default is 1e-6, if less than 33 channel 1e-7 is recommended).

maxsteps: max number of ICA training steps. Default is 512.

sphering: [‘on’/’off’] flag sphering of data. Default is ‘on’.

Note: EEG data will be imported as EEG structure using EEGLAB. EEG.data should be channels × time points OR channels × time points × epochs.

Outputs

For each subject, a zip file which contain the EEG dataset with new fields icaweights, icasphere and icachansind (channel indices). (saved as EEG .set file which contains the ICA results). The EEG dataset can also be imported and used in EEGLAB.

EEG.icasphere: ICA sphere;

EEG.icaweights: ICA weights;

EEG.icachansind: selcet channels;

EEG.activations: ICA components. If EEG data is epoched, the activations (corresponding to ICA time courses) will be generated;

EEG.icawinv = pinv(icaweights * icasphere); % a priori same result as inv.

EEG.ICAPara.ICs: number of ICA components;

EEG.ICAPara.Ntrain: perform tanh() "extended-ICA" with sign estimation N training blocks;

EEG.ICAPara.PCs: the number of PCs to retain.

EEG.ICAPara.stop: stop training when weight-change < this.

EEG.ICAPara.MaxSteps: max number of ICA training steps;

EEG.ICAPara.sphering: flag sphering of data;

## WB_EEG_runICA

### Who is online

Users browsing this forum: No registered users and 1 guest