[Eeglablist] Function to reject a specific percentage of trials

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Wed Jul 19 11:41:41 PDT 2023


Dear Luisa,

I do not necessarily know all the EEGLAB functions and plugins, but I have
never heard of it.
But I can think of several reasons why it is not there.

(1) Obviously, how clean the data differs from dataset to dataset. If the
data are perfectly clean, you do not want to reject as much as 5%. If the
data are terribly dirty, what's the point of rejecting only 5%? etc.
(2) Because of the above reason, you need some level of adaptiveness i.e.
based on each input dataset to flexibly change the definition of 'clean
data'. But hard coding such a criterion, most likely using some heuristics
as well, is hard.
(3) If someone knows how to do it, they just do it from the command line.
If someone do not know how to do it, they can't write the solution.
(4) Alternatively, using ASR in clean_rawdata() can solve the problem in a
different (hopefully more reasonable and efficient) way.

Let's think about rejecting the top 5% of the highest amplitude.
Imagine you have 20 channel EEG dataset, and high-amplitude outlier appears
in one of the channel in every epoch. What happens is that if you
mechanically apply 5% thresholding, then you'll lose 100% of data. This is
an extreme example, but by using ASR you can elegantly address this
problem. See my slides here
https://urldefense.com/v3/__https://docs.google.com/presentation/d/16juxoldWT7V_J3rheOIl2wslJo7Xdc4D?rtpof=true&usp=drive_fs__;!!Mih3wA!COyN_v1vK1CRrvGzYbJHW1GDB30nnsGXlKT0_mNbRp4nTMM-moczhdBZRo7y7zYWX7brJz4Vzg3ti9V0qvgLXOLdM6E$ 

Makoto


On Wed, Jul 5, 2023 at 5:20 PM Luisa Mwole via eeglablist <
eeglablist at sccn.ucsd.edu> wrote:

> Hello list,
>
> I wanted to ask whether there is a function/ plugin that rejects a specific
> percentage of trials (for example 5% based on the highest amplitudes).
>
> If not, I could of course also write one. But since it is a common practice
> to do so for artifact rejection, I thought that it might already exist and
> could thus save some time and effort since the already existing functions
> might also be computationally more efficient than my custom-made ones.
>
> Thanks!
> Luisa Mwole
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>



More information about the eeglablist mailing list