[FieldTrip] using cfg.runica.pca to reduce number of ICs

Roemer van der Meij r.vandermeij at donders.ru.nl
Thu Apr 10 12:01:29 CEST 2014


Hi Fred,

cfg.runica.pca sets cfg.numcomponent for runica (corrected in revision on
ft tonight).

If you use ICA to remove artifacts for subsequent analyses, please keep in
mind that any structure not covered by the extracted components is lost. As
such, I would advice you to extract the maximum number of components, or if
to computationally expensive, the number of components that explain, say,
99% of the variance of the covariance matrix.

You can do this for example by:
% determine cfg.numcomponent by doing an eig on the covariance matrix
covar = zeros(numel(data.label));
for itrial = 1:numel(data.trial)
  currtrial = data.trial{itrial};
  covar = covar + currtrial*currtrial.';
end
[V, D] = eig(covar);
D = sort(diag(D),'descend');
D = D ./ sum(D);
Dcum = cumsum(D);
cfg.numcomponent = find(Dcum>.99,1,'first');

Best,
Roemer









On Tue, Apr 8, 2014 at 2:46 PM, Frédéric Roux <f.roux at bcbl.eu> wrote:

> Dear all,
>
> I have a general question relating to the usage of cfg.runica.pca
> during the call to ft_componentanalysis.
>
> Is it correct to assume that cfg.runica.pca = length(meg_data.label) will
> force the algorithm to return n = length(meg_data.label) ICs, and that as a
> result artifacts can be "spread" across several ICs?
>
> If that's true, then I imagine that cfg.runica.pac = n/4 will return less
> components
> and reduce the "spread" of artifacts over several components.
>
> My question is how to choose the number of principal components to which
> the data
> is reduced before ICA?
>
> Best,
> Fred
> ---------------------------------------------------------------------------
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 
Roemer van der Meij M.Sc.
PhD Candidate
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3655932
E-mail: r.vandermeij at donders.ru.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140410/d9b2a2d1/attachment.html>


More information about the fieldtrip mailing list