[FieldTrip] ft_rejectcomponent with or withouth data input

Johanna Zumer johanna.zumer at gmail.com
Mon Dec 29 13:00:37 CET 2014

Dear Nenad,

One difference is that 'data' need not be the same 'data' that was used to
create 'comp'.
For example, you can have 'data' which is the original/raw data, then do
some preprocessing on it to create 'data1'.
Then call comp=ft_componentanalysis(cfg,data1).
Then you can decide which components to reject from comp but apply this
rejection to 'data' rather than 'data1'.

In your case of calling PCA for dimensionality reduction, let's say for
example your 'data' has 100 channels and you set PCA to 50.  Then 'comp'
will have 50 components (rank 50).  Let's say you want to reject 2
components.  Then the output of ft_rejectcomponent(cfg,comp) will end up in
channel space (100 channels) but of only rank 48.   However, the output of
ft_rejectcomponent(cfg,comp,data) will be in channel space (100 channels)
but of rank 98.

There are additional differences, such as mentioned in the 'help
documentation' of ft_rejectcomponent, namely "Please use this option of
including data as input, if you wish to use the output data.grad in further
computation, for example for leadfield computation."   This is for the
data.grad.tra to be updated appropriately for leadfields.

Hope that helps, and perhaps there should be a FAQ on the wiki for this.


2014-12-23 15:25 GMT+00:00 Nenad Polomac <polomacnenad at gmail.com>:

> Dear Fieldtrip users,
> I would like to ask for one explanation. Could anyone in more detail
> explain the difference between ft_rejectcomponent(cfg, comp) and
> ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use.
> I have read available information about that and tried out both methods. I
> understand that data input will lead to back-projection of the data into
> the original subspace. However I am still not sure which one I should use.
> Furthermore, in the ICA calculation I have used cfg.runica.pca for data
> dimensionality reduction.
> Any clarification of this issue would be greatly appreciated!
> Thank you in advance!
> All the best and happy holidays,
> Nenad
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141229/d88a61a0/attachment-0002.html>

More information about the fieldtrip mailing list