This documentation is for development version 0.18.dev0.

mne.decoding.compute_ems

mne.decoding.compute_ems(epochs, conditions=None, picks=None, n_jobs=1, cv=None, verbose=None)[source]

Compute event-matched spatial filter on epochs.

This version of EMS [1] operates on the entire time course. No time window needs to be specified. The result is a spatial filter at each time point and a corresponding time course. Intuitively, the result gives the similarity between the filter at each time point and the data vector (sensors) at that time point.

Parameters:
epochs : instance of mne.Epochs

The epochs.

conditions : list of str | None, default None

If a list of strings, strings must match the epochs.event_id’s key as well as the number of conditions supported by the objective_function. If None keys in epochs.event_id are used.

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 good data channels.

n_jobs : int, default 1

Number of jobs to run in parallel.

cv : cross-validation object | str | None, default LeaveOneOut

The cross-validation scheme.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns:
surrogate_trials : ndarray, shape (n_trials // 2, n_times)

The trial surrogates.

mean_spatial_filter : ndarray, shape (n_channels, n_times)

The set of spatial filters.

conditions : ndarray, shape (n_classes,)

The conditions used. Values correspond to original event ids.

References

[1](1, 2) Aaron Schurger, Sebastien Marti, and Stanislas Dehaene, “Reducing multi-sensor data to a single time course that reveals experimental effects”, BMC Neuroscience 2013, 14:122

Examples using mne.decoding.compute_ems