Implementation of the Xdawn Algorithm compatible with scikit-learn. Xdawn is a spatial filtering method designed to improve the signal to signal + noise ratio (SSNR) of the event related responses. Xdawn was originally designed for P300 evoked potential by enhancing the target respo
| 21 | |
| 22 | @fill_doc |
| 23 | class XdawnTransformer(_GEDTransformer): |
| 24 | """Implementation of the Xdawn Algorithm compatible with scikit-learn. |
| 25 | |
| 26 | Xdawn is a spatial filtering method designed to improve the signal |
| 27 | to signal + noise ratio (SSNR) of the event related responses. Xdawn was |
| 28 | originally designed for P300 evoked potential by enhancing the target |
| 29 | response with respect to the non-target response. This implementation is a |
| 30 | generalization to any type of event related response. |
| 31 | |
| 32 | .. note:: XdawnTransformer does not correct for epochs overlap. To correct |
| 33 | overlaps see `mne.preprocessing.Xdawn`. |
| 34 | |
| 35 | Parameters |
| 36 | ---------- |
| 37 | n_components : int (default 2) |
| 38 | The number of components to decompose the signals. |
| 39 | reg : float | str | None (default None) |
| 40 | If not None (same as ``'empirical'``, default), allow |
| 41 | regularization for covariance estimation. |
| 42 | If float, shrinkage is used (0 <= shrinkage <= 1). |
| 43 | For str options, ``reg`` will be passed to ``method`` to |
| 44 | :func:`mne.compute_covariance`. |
| 45 | signal_cov : None | Covariance | array, shape (n_channels, n_channels) |
| 46 | The signal covariance used for whitening of the data. |
| 47 | if None, the covariance is estimated from the epochs signal. |
| 48 | cov_method_params : dict | None |
| 49 | Parameters to pass to :func:`mne.compute_covariance`. |
| 50 | |
| 51 | .. versionadded:: 0.16 |
| 52 | restr_type : "restricting" | "whitening" | None |
| 53 | Restricting transformation for covariance matrices before performing |
| 54 | generalized eigendecomposition. |
| 55 | If "restricting" only restriction to the principal subspace of signal_cov |
| 56 | will be performed. |
| 57 | If "whitening", covariance matrices will be additionally rescaled according |
| 58 | to the whitening for the signal_cov. |
| 59 | If None, no restriction will be applied. Defaults to None. |
| 60 | |
| 61 | .. versionadded:: 1.11 |
| 62 | info : mne.Info | None |
| 63 | The mne.Info object with information about the sensors and methods of |
| 64 | measurement used for covariance estimation and generalized |
| 65 | eigendecomposition. |
| 66 | If None, one channel type and no projections will be assumed and if |
| 67 | rank is dict, it will be sum of ranks per channel type. |
| 68 | Defaults to None. |
| 69 | |
| 70 | .. versionadded:: 1.11 |
| 71 | %(rank_full)s |
| 72 | |
| 73 | .. versionadded:: 1.11 |
| 74 | |
| 75 | Attributes |
| 76 | ---------- |
| 77 | classes_ : array, shape (n_classes) |
| 78 | The event indices of the classes. |
| 79 | filters_ : array, shape (n_channels, n_channels) |
| 80 | The Xdawn components used to decompose the data for each event type. |
no outgoing calls