autoreject.compute_thresholds

autoreject.compute_thresholds(epochs, method='bayesian_optimization', random_state=None, picks=None, augment=True, verbose='progressbar', 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

picksndarray, shape(n_channels,) | None

The channels to be considered for autoreject. If None, defaults to data channels {‘meg’, ‘eeg’}.

augmentboolean

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

verbose‘tqdm’, ‘tqdm_notebook’, ‘progressbar’ or False

The verbosity of progress messages. If ‘progressbar’, use mne.utils.ProgressBar. If ‘tqdm’, use tqdm.tqdm. If ‘tqdm_notebook’, use tqdm.tqdm_notebook. 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