mne.decoding.EMS

class mne.decoding.EMS[source]

Transformer to compute event-matched spatial filters.

This version of EMS [R78ea2cca2302-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.

References

R78ea2cca2302-1

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

Attributes
filters_ndarray, shape (n_channels, n_times)

The set of spatial filters.

classes_ndarray, shape (n_classes,)

The target classes.

Methods

__hash__(self, /)

Return hash(self).

fit(self, X, y)

Fit the spatial filters.

fit_transform(self, X[, y])

Fit to data, then transform it.

get_params(self[, deep])

Get the estimator params.

set_params(self, \*\*params)

Set parameters (mimics sklearn API).

transform(self, X)

Transform the data by the spatial filters.

__hash__(self, /)

Return hash(self).

fit(self, X, y)[source]

Fit the spatial filters.

Parameters
Xarray, shape (n_epochs, n_channels, n_times)

The training data.

yarray of int, shape (n_epochs)

The target classes.

Returns
selfinstance of EMS

Returns self.

Examples using fit:

fit_transform(self, X, y=None, **fit_params)[source]

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
Xarray, shape (n_samples, n_features)

Training set.

yarray, shape (n_samples,)

Target values.

Returns
X_newarray, shape (n_samples, n_features_new)

Transformed array.

get_params(self, deep=True)[source]

Get the estimator params.

Parameters
deepbool

Deep.

set_params(self, **params)[source]

Set parameters (mimics sklearn API).

transform(self, X)[source]

Transform the data by the spatial filters.

Parameters
Xarray, shape (n_epochs, n_channels, n_times)

The input data.

Returns
Xarray, shape (n_epochs, n_times)

The input data transformed by the spatial filters.

Examples using transform: