[FieldTrip] question about automatic artefact rejection
De Meyer, Kris
kris.de_meyer at kcl.ac.uk
Wed Feb 19 14:12:14 CET 2020
Thanks for the clarification, Jan Mathijs.
In the data I've looked at, the histogram of a [110,140]Hz bandpass-filtered signal usually is pretty Gaussian if not affected by EMG noise, but becomes more an more heavy-tailed the more EMG noise is present.
I didn't yet mention that in my research, I look at high-gamma frequencies (anything up to 170Hz) so I have a feeling that there might be an impact on inferential statistics if data contaminated with EMG is not adequately excluded.
I'll test this approach further to see what happens.
Best,
Kris
________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl>
Sent: 19 February 2020 12:25
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] question about automatic artefact rejection
Hi Kris,
I think that Eelke meant that the Z-scoring leads to the threshold becoming independent of the signals’ physical units.
I agree that the signals have a non-Gaussian distribution, but this is equally true for non-envelope signals.
Personally I think that normalisation with an estimate of the median or mad at this stage of an analysis pipeline is not going to change the outcome of the science much (i.e. the inferential decisions), but if you have a good implementation of this, we could certainly build this in as an option. I would however welcome much more improvements to the way that we compute our test-statistics that we use for inferential decision making, e.g. using Yuen-Welch T-statistics based on trimmed means and variances, rather than the good old T-statistic.
Feel free to submit your version of the code as a PR to the github repository.
Best wishes,
Jan-Mathijs
On 19 Feb 2020, at 13:13, De Meyer, Kris <kris.de_meyer at kcl.ac.uk<mailto:kris.de_meyer at kcl.ac.uk>> wrote:
Thank you for your response, Eelke.
I guess it makes sense but it does make the selection of a threshold more arbitrary.
If your underlying distribution is normal, then a z-score of 3, 4 or 5 has a clear meaning in terms of outlier detection.
For a non-Gaussian distribution, that interpretation no longer holds, and rejection becomes less automated and more open to subjective interpretation.
Isn't it better to z-transform the Hilbert-envelope values with the mean/std or the median/mad of the original filtered EEG distribution rather than the mean/std or median/mad of the hilbert values distribution? That way, the meaning of the threshold magnitude would remain valid. Or is that what is happening in the code already?
Best,
Kris
________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Eelke Spaak <e.spaak at donders.ru.nl<mailto:e.spaak at donders.ru.nl>>
Sent: 18 February 2020 10:45
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: Re: [FieldTrip] question about automatic artefact rejection
Dear Kris,
Since there is no statistical test involved, I see no problems with
computing a z-score here. Think of it more as bringing the data into a
sensible range and allowing yourself to forget about details like
measurement unit etc. You could also not do the z-transform, and
simply specify a threshold based on raw amplitude, this would be
equivalent (but might make it potentially more difficult to come up
with a good threshold).
Best,
Eelke
On Tue, 18 Feb 2020 at 09:47, De Meyer, Kris <kris.de_meyer at kcl.ac.uk<mailto:kris.de_meyer at kcl.ac.uk>> wrote:
>
> Dear Fieldtrippers,
>
> In ft_artifact_muscle, an EEG signal is first filtered - usually with a bandpass filter with cutoff frequencies of [110,140]. The documentation then says that the hilbert envelope is calculated, after which the envelope values are z-transformed before they are thresholded.
>
> However, is this sound? Whereas the actual filtered EEG values (the result of the bandpass filter) are usually normally distributed, the hilbert envelope values are far from.
>
> What is the rationale for calculating the z-transform of a non-Gaussian distribution? Doesn't that introduce problems?
>
> Best,
>
> Kris
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&sdata=miiXPIhNF0zd23xrFrXakUxAUldGY6DZLnhoajNtLlg%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C1ef7324b284f48ad071808d7b53b45d2%7C8370cf1416f34c16b83c724071654356%7C0&sdata=a%2Bqp7NHGdqGDXQYTfX7Cyc5c09os7PateHh90X8Avcg%3D&reserved=0>
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&sdata=DNmcynQGcA4%2FAmDi8PSk8UE%2FBfy0Ce8yGRPr3Cv%2BvZ8%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C1ef7324b284f48ad071808d7b53b45d2%7C8370cf1416f34c16b83c724071654356%7C0&sdata=0maH36cX2eNdw10F2tBphe7s8%2FiukaJjz9TIoq17iT8%3D&reserved=0>
_______________________________________________
fieldtrip mailing list
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&sdata=miiXPIhNF0zd23xrFrXakUxAUldGY6DZLnhoajNtLlg%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C1ef7324b284f48ad071808d7b53b45d2%7C8370cf1416f34c16b83c724071654356%7C0&sdata=a%2Bqp7NHGdqGDXQYTfX7Cyc5c09os7PateHh90X8Avcg%3D&reserved=0>
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&sdata=DNmcynQGcA4%2FAmDi8PSk8UE%2FBfy0Ce8yGRPr3Cv%2BvZ8%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C1ef7324b284f48ad071808d7b53b45d2%7C8370cf1416f34c16b83c724071654356%7C0&sdata=0maH36cX2eNdw10F2tBphe7s8%2FiukaJjz9TIoq17iT8%3D&reserved=0>
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C1ef7324b284f48ad071808d7b53b45d2%7C8370cf1416f34c16b83c724071654356%7C0&sdata=a%2Bqp7NHGdqGDXQYTfX7Cyc5c09os7PateHh90X8Avcg%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C1ef7324b284f48ad071808d7b53b45d2%7C8370cf1416f34c16b83c724071654356%7C0&sdata=0maH36cX2eNdw10F2tBphe7s8%2FiukaJjz9TIoq17iT8%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200219/388f1e39/attachment.htm>
More information about the fieldtrip
mailing list