[FieldTrip] Decoding principal components vs. Backprojected sensor-level data

Barnett, Benjy benjy.barnett.20 at ucl.ac.uk
Fri Sep 8 16:04:02 CEST 2023


Hey everyone,

I’m trying to work out why I am getting different decoding results using what I think to be rather equivalent pipelines.

I am currently try to decode trials from my dataset after removing the first principal component. However, I’m getting drastically different results depending on how I do the component removal.

If I follow what I imagine is the recommended method, I do this:


    cfg = [];
    cfg.method = 'pca';
    cfg.updatesens = 'yes';
    comp = ft_componentanalysis(cfg, data);

   %remove component
    cfg  = [];
    cfg.component = 1;
    data = ft_rejectcomponent(cfg,comp,data); %data to be decoded


However, I could instead just decode the components after removing the first, like this:

    cfg = [];
    cfg.method = 'pca';
    cfg.updatesens = 'yes';
    comp = ft_componentanalysis(cfg, data);

   %remove component
    cfg = [];
    cfg.channel = comp.label(2:end);
    data = ft_selectdata(cfg,comp); %data to be decoded


The first method (back projection) gives me results almost identical to that of the decoding of the full, original data - whereas the second method (decoding raw components) abolishes all successful decoding.

I’m not sure what the technical difference is here, because in my mind the information contained in both datasets (components vs. back projected) is the same, so I’m not sure why one abolishes decoding but the other does not. As such, I’m not sure which method is the correct one for my purposes of simply removing the first principal component prior to decoding.

I appreciate any guidance or help,
Benjy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230908/1f7e186e/attachment.htm>


More information about the fieldtrip mailing list