[FieldTrip] Using ft_rejectcomponent after PCA reduction

Charidimos Tzagarakis haristz at gmail.com
Sat Jun 8 00:25:03 CEST 2013


Dear Fieldtripverse,
I have been experimenting with using ICA for artifact correction and have
the following question:
Because of the relatively large number of channels vs samples I have, I use
the option to first reduce the dimensionality of the data with PCA (I have
248 MEG channels and I select, say 100 components, using the <for
cfg.method="runica"> cfg.numcomponent=100 and cfg.runica.pca=100 in the
call to ft_componentanalysis ).
So the "topo" matrix in the component output structure has dimensions
248x100 and the unmixing matrix has dimensions 100x248. I then use
something like "data = ft_rejectcomponent(cfg, comp,data)" to say reject 2
components cfg.component=[30 40] that contain ECG signal. Note: data here
is the original data I fed in the ft_componentanalysis function.
This is all pretty straightforward and as described in the Fieldtrip
tutorial (minus the PCA part) . I am however a bit worried by the
message:"removing 2 components
keeping 246 components" I get in the end. Should it not be "removing 2
components
keeping 98 components"? When I look in the code for ft_rejectcomponent, I
can see that if "hasdata" is True the message is calculated based on the
number of channels : fprintf('keeping %d components\n',
nchans-length(cfg.component));
On the other hand (as far as I can tell, not being an ICA expert) the
actual calculation for the removal of the desired components seems to
correctly use the components selected for removal :
  mixing = comp.topo(selcomp,:);
  unmixing = comp.unmixing(:,selcomp);
  tra = eye(length(selcomp)) - mixing(:, cfg.component)*unmixing(cfg.
component, :);
(I do note the comment under that snippet!:
 %I am not sure about this, but it gives comparable results to the ~hasdata
case
  %when comp contains non-orthogonal (=ica) topographies, and contains a
complete decomposition)

Further down the function code there are however more operations (eg remove
unused channels, remove unused components ) where I am less able to follow
things to make sure it is robust to non-square mixing and unmixing
matrices.

In summary, I wanted to ask if it is OK to use ft_rejectcomponent in this
way (ie without decomposing to the full number of ICA's and then using it
on the original data).
With Thanks and Best Wishes,
Haris

Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych
University of Minnesota Dept of Neuroscience and Brain Sciences Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130607/35cfec20/attachment-0001.html>


More information about the fieldtrip mailing list