[Mne_analysis] Using autoreject to compute local threshes impacts the epochs dropped using a global threshold.
Scheltienne Mathieu
mathieu.scheltienne at epfl.ch
Wed Apr 7 08:24:12 EDT 2021
External Email - Use Caution
Hello MNE community,
I am trying to use autoreject to drop bad epochs with the function get_rejection_threshold. I discovered recently the local threshes method called compute_thresholds (https://secure-web.cisco.com/1CcwdlywCbijuuyontwrpR2RM-iORyyZzysS5LaEoDavTFgt3_O3TTgmNyHrtuPCUxGgiImzyYMFk6mx3id0seqxhRrx_32JUuPl6GvrZ9d708hCg5po5imvlDYuDiOsN8o5j_u72y_RZ8OaT_yCv0cpb_V_4IsWtIwAqQPm7i-Szv3js5jE6AMt3zBXPmfcpKQuObiwTZr6_Jw1upCYhcElW0mMv6ffmXX1vkcmAYeUGoCCLjLuzzk-mtSwALbc-IdFsuJEHsmKYAxfRkRB_TQ/https%3A%2F%2Fautoreject.github.io%2Fauto_examples%2Fplot_channel_thresholds.html%23sphx-glr-auto-examples-plot-channel-thresholds-py) and I do not manage to understand the behavior below:
Code 1:
epochs = mne.Epochs(raw, events, event_id=event_dict['audio'], picks=['eeg', 'eog', 'ecg'],
tmin=tmin, tmax=tmax, reject=None,
proj=True, baseline=(None, 0), preload=True)
reject = get_rejection_threshold(epochs, ch_types='eeg', decim=2)
epochs.drop_bad(reject=reject)
OUT: <Epochs | 69 events (all good), -0.2 - 0.798 sec, baseline [-0.2, 0] sec, ~17.5 MB, data loaded, '4': 69>
Code 2:
epochs = mne.Epochs(raw, events, event_id=event_dict['audio'], picks=['eeg', 'eog', 'ecg'],
tmin=tmin, tmax=tmax, reject=None,
proj=True, baseline=(None, 0), preload=True)
reject = get_rejection_threshold(epochs, ch_types='eeg', decim=2)
picks = mne.pick_types(epochs.info, meg=False, eeg=True, stim=False, ecg=False,
eog=False, exclude='bads')
local_rejection_threshes = compute_thresholds(epochs, picks=picks, method='random_search',
augment=True, verbose='progressbar')
epochs.drop_bad(reject=reject)
OUT: <Epochs | 26 events (all good), -0.2 - 0.798 sec, baseline [-0.2, 0] sec, ~6.6 MB, data loaded, '4': 26>
Why is the computation of thresholds impacting (heavily) the number of epochs retained when using the same global rejection threshold?
Best,
Mathieu Scheltienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210407/b6845be0/attachment.html
More information about the Mne_analysis
mailing list