[FieldTrip] Maxfilter and PCA

Lorenzo Magazzini magazzinil at gmail.com
Mon Sep 19 13:48:55 CEST 2016

Hi Mike,

This is a question that I've been asking myself too and I'd love to hear an
expert (and more technical) answer. In the meantime, these discussions may
be of help:


I wonder if the confusion arises from the difference between rank and
number of components? My understanding is that maxfilter reduces the rank
of the data (from 306 to 64, apparently). Therefore, my best guess is that
by performing a PCA and rejecting a number of components (only the first 50
are kept, in the tutorial example), the data is no longer rank-deficient,
i.e. the rank is equal or greater than the number of components in the data.

Clearly, this is a very non-technical interpretation, and a correction
would be more than welcome.. :)


Lorenzo Magazzini

PhD Student

magazzinil at cardiff.ac.uk

CUBRIC Building
Maindy Road

CF24 4HQ

On 19 September 2016 at 11:25, Hall, Michael (Research Student) <
hallmbh at aston.ac.uk> wrote:

> Dear All,
> I've been doing some testing with elekta neuromag data in Fieldtrip using
> different sensor types (meg, meggrad, megmag) and different preprocessing
> steps (tSSS 0.9 corr limit, no tSSS).
> A step that was proposed at the MEG UK 2015 demo was to use PCA to
> compensate for the ill-conditioned estimate of the cov/csd matrix due to
> maxfilter - could I ask why running a PCA and reducing the number of
> components further would compensate for this? Apologies if this a naive
> question, however I would assume that you would not want to reduce the rank
> of your data further? Please see below for the link and code that I'm
> referring to.
> http://www.fieldtriptoolbox.org/workshop/meg-uk-2015/fieldtr
> ip-beamformer-demo
> %% deal with maxfilter
> % the data has been maxfiltered and subsequently concatenated
> % this results in an ill-conditioned estimate of covariance or CSD
> cfg = [];
> cfg.method = 'pca';
> cfg.updatesens = 'no';
> cfg.channel = 'MEGMAG';
> comp = ft_componentanalysis(cfg, data);
> cfg = [];
> cfg.updatesens = 'no';
> cfg.component = comp.label(51:end);
> data_fix = ft_rejectcomponent(cfg, comp);
> Many thanks,
> Mike Hall
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160919/9e1d1612/attachment-0002.html>

More information about the fieldtrip mailing list