mne.decoding.UnsupervisedSpatialFilter

class mne.decoding.UnsupervisedSpatialFilter(estimator, average=False)[source]

Use unsupervised spatial filtering across time and samples.

Parameters:

estimator : scikit-learn estimator

Estimator using some decomposition algorithm.

average : bool, defaults to False

If True, the estimator is fitted on the average across samples (e.g. epochs).

Methods

__hash__() <==> hash(x)
fit(X[, y]) Fit the spatial filters.
fit_transform(X[, y]) Transform the data to its filtered components after fitting.
get_params([deep]) Get parameters for this estimator.
set_params(**params) Set the parameters of this estimator.
transform(X) Transform the data to its spatial filters.
__hash__() <==> hash(x)
fit(X, y=None)[source]

Fit the spatial filters.

Parameters:

X : array, shape (n_epochs, n_channels, n_times)

The data to be filtered.

y : None | array, shape (n_samples,)

Used for scikit-learn compatibility.

Returns:

self : Instance of UnsupervisedSpatialFilter

Return the modified instance.

fit_transform(X, y=None)[source]

Transform the data to its filtered components after fitting.

Parameters:

X : array, shape (n_epochs, n_channels, n_times)

The data to be filtered.

y : None | array, shape (n_samples,)

Used for scikit-learn compatibility.

Returns:

X : array, shape (n_trials, n_channels, n_times)

The transformed data.

get_params(deep=True)[source]

Get parameters for this estimator.

Parameters:

deep : boolean, optional

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:

params : mapping of string to any

Parameter names mapped to their values.

set_params(**params)[source]

Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Returns ——- self

transform(X)[source]

Transform the data to its spatial filters.

Parameters:

X : array, shape (n_epochs, n_channels, n_times)

The data to be filtered.

Returns:

X : array, shape (n_trials, n_channels, n_times)

The transformed data.