Back to the main page.
Bug 2798 - create FAQ on ft_rejectcomponent(cfg,comp) versus ft_rejectcomponent(cfg,comp,data)
Status | CLOSED DUPLICATE |
Reported | 2014-12-29 13:02:00 +0100 |
Modified | 2019-08-10 12:30:54 +0200 |
Product: | FieldTrip |
Component: | documentation |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Johanna - 2014-12-29 13:02:31 +0100
Email exchange on FT list: 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'. (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2013-October/007118.html or http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007608.html) 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. Regards, Johanna 2014-12-23 15:25 GMT+00:00 Nenad Polomac <polomacnenad@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
Jan-Mathijs Schoffelen - 2015-01-09 09:24:21 +0100
This is a duplicate of 2797 *** This bug has been marked as a duplicate of bug 2797 ***