autoreject.compute_thresholds

autoreject.compute_thresholds(epochs, method='bayesian_optimization', random_state=None, picks=None, augment=True, verbose=True, n_jobs=1)[source]

Compute thresholds for each channel.

Parameters
epochsinstance of mne.Epochs

The epochs objects whose thresholds must be computed.

methodstr

‘bayesian_optimization’ or ‘random_search’

random_stateint seed, RandomState instance, or None (default)

The seed of the pseudo random number generator to use

picksstr | list | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values 'all' to pick all channels, or 'data' to pick data channels. None (default) will pick data channels {‘meg’, ‘eeg’}. Note that channels in info['bads'] will be included if their names or indices are explicitly provided.

augmentbool

Whether to augment the data or not. By default it is True, but set it to False, if the channel locations are not available.

verbosebool

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

n_jobsint

Number of jobs to run in parallel

Returns
threshesdict

The channel-level rejection thresholds

Examples

For example, we can compute the channel-level thresholds for all the EEG sensors this way:

>>> compute_thresholds(epochs)
Fork me on GitHub