autoreject.get_rejection_threshold#

autoreject.get_rejection_threshold(epochs, decim=1, random_state=None, ch_types=None, cv=5, verbose=True)[source]#

Compute global rejection thresholds.

Parameters:
epochsmne.Epochs

The epochs from which to estimate the epochs dictionary

decimint

The decimation factor: Increment for selecting every nth time slice.

random_stateint | np.random.RandomState | None

The seed of the pseudo random number generator to use. Defaults to None.

ch_typesstr | list of str | None

The channel types for which to find the rejection dictionary. e.g., [‘mag’, ‘grad’]. If None, the rejection dictionary will have keys [‘mag’, ‘grad’, ‘eeg’, ‘eog’, ‘hbo’, ‘hbr’, ‘ecog’, ‘seeg’].

cvint | sklearn.model_selection object

Defaults to cv=5.

verbosebool

The verbosity of progress messages. If False, suppress all output messages.

Returns:
rejectdict

The rejection dictionary with keys as specified by ch_types.

Notes

Sensors marked as bad by user will be excluded when estimating the rejection dictionary.

Examples using autoreject.get_rejection_threshold#

Find global rejection threshold

Find global rejection threshold

Plotting the cross-validation curve

Plotting the cross-validation curve