Event-related response enhancement with xDAWN spatial filtering.
More...
#include <xdawn.h>
Event-related response enhancement with xDAWN spatial filtering.
Typical usage:
static Eigen::MatrixXd apply(const Eigen::MatrixXd &matEpoch, const XdawnResult &result)
static XdawnResult fit(const QVector< MNELIB::MNEEpochData > &epochs, int iTargetEvent=1, int nComponents=2, double dReg=1e-6)
static Eigen::MatrixXd denoise(const Eigen::MatrixXd &matEpoch, const XdawnResult &result, int nComponents=-1)
Definition at line 95 of file xdawn.h.
◆ apply()
| MatrixXd Xdawn::apply |
( |
const Eigen::MatrixXd & | matEpoch, |
|
|
const XdawnResult & | result ) |
|
static |
Project one epoch into xDAWN component space.
- Parameters
-
| [in] | matEpoch | Epoch data (n_channels x n_samples). |
| [in] | result | Result from fit(). |
- Returns
- Component activations (n_components x n_samples).
Definition at line 236 of file xdawn.cpp.
◆ denoise()
| MatrixXd Xdawn::denoise |
( |
const Eigen::MatrixXd & | matEpoch, |
|
|
const XdawnResult & | result, |
|
|
int | nComponents = -1 ) |
|
static |
Reconstruct one epoch from the first nComponents xDAWN components.
If nComponents <= 0 or exceeds the fitted dimensionality, all fitted components are used.
- Parameters
-
| [in] | matEpoch | Epoch data (n_channels x n_samples). |
| [in] | result | Result from fit(). |
| [in] | nComponents | Number of leading xDAWN components to keep. |
- Returns
- Denoised epoch (n_channels x n_samples).
Definition at line 252 of file xdawn.cpp.
◆ denoiseEpochs()
Apply denoise() to all epochs in the vector, preserving metadata.
- Parameters
-
| [in] | epochs | Input epochs. |
| [in] | result | Result from fit(). |
| [in] | nComponents | Number of leading xDAWN components to keep. |
- Returns
- Copy of the input epochs with denoised epoch matrices.
Definition at line 275 of file xdawn.cpp.
◆ fit()
Fit xDAWN spatial filters for a target event code.
Uses non-rejected epochs only. The target signal covariance is estimated from the average of epochs whose MNEEpochData::event equals iTargetEvent. The noise covariance is estimated from residuals around the class-wise average for each event type.
- Parameters
-
| [in] | epochs | Input epochs. |
| [in] | iTargetEvent | Event code whose ERP/ERF should be enhanced. |
| [in] | nComponents | Number of xDAWN components to retain. |
| [in] | dReg | Relative diagonal regularisation added to the noise covariance. |
- Returns
- XdawnResult containing filters, patterns, and covariances.
Definition at line 90 of file xdawn.cpp.
The documentation for this class was generated from the following files: