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.
- method
str ‘bayesian_optimization’ or ‘random_search’
- random_state
int|np.random.RandomState|None The seed of the pseudo random number generator to use. Defaults to None.
- picks
str|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 ininfo['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_jobs
int Number of jobs to run in parallel
- epochsinstance of
- Returns:
- threshes
dict The channel-level rejection thresholds
- threshes
Examples
For example, we can compute the channel-level thresholds for all the EEG sensors this way:
>>> compute_thresholds(epochs)