Spatio-spectral decomposition for narrowband signal enhancement on continuous M/EEG. More...
#include <decoding_ssd.h>
Public Member Functions | |
| DecodingSsd (int nComponents=6, double regParam=0.05) | |
| void | fit (const Eigen::Ref< const Eigen::MatrixXd > &data, double sfreq, double signalLow, double signalHigh, double noiseLow, double noiseHigh) |
| Eigen::MatrixXd | transform (const Eigen::Ref< const Eigen::MatrixXd > &data) const |
| Eigen::MatrixXd | fitTransform (const Eigen::Ref< const Eigen::MatrixXd > &data, double sfreq, double signalLow, double signalHigh, double noiseLow, double noiseHigh) |
| Eigen::MatrixXd | apply (const Eigen::Ref< const Eigen::MatrixXd > &data) const |
| const Eigen::MatrixXd & | filters () const |
| const Eigen::MatrixXd & | patterns () const |
| const Eigen::VectorXd & | eigenvalues () const |
| bool | isFitted () const |
Spatio-spectral decomposition for narrowband signal enhancement on continuous M/EEG.
Computes the spatial filters that jointly maximise variance in the caller-specified signal band and minimise it in the surrounding noise band, returning the n_components leading components ranked by signal-to-noise eigenvalue. The fit takes raw continuous data (channels × samples), bandpasses it twice internally with a zero- phase windowed-sinc FIR, builds the two covariance matrices, shrinks the noise covariance towards a scaled identity by regParam to keep the generalised eigenproblem well-conditioned, and stores the resulting filters, patterns and eigenvalues. The eigenvalues are directly interpretable as the per-component signal-band power gain over the noise band and are the standard diagnostic for choosing the effective rank of the decomposition.
transform returns the components themselves — a low-dimensional signal that already lives in the band of interest — while apply performs the low-rank back-projection \(X_{\text{clean}} = A_{:,1:k} W_{1:k,:} X\) that yields a sensor-space, denoised reconstruction with the oscillation of interest preserved and the broadband background suppressed; this is the call most downstream pipelines (connectivity, inverse modelling) want when SSD is used purely as a preprocessor.
mne.decoding.SSD Definition at line 88 of file decoding_ssd.h.
|
explicit |
Constructs an SSD decoder.
| [in] | nComponents | Number of SSD components. Default: 6. |
| [in] | regParam | Regularisation parameter for noise covariance. Default: 0.05. |
Definition at line 64 of file decoding_ssd.cpp.
| MatrixXd DecodingSsd::apply | ( | const Eigen::Ref< const Eigen::MatrixXd > & | data | ) | const |
Denoise data by low-rank factorisation.
Reconstructs M/EEG signals from which the dynamics described by the excluded components is subtracted.
| [in] | data | Continuous data (n_channels × n_times). |
Definition at line 157 of file decoding_ssd.cpp.
| const VectorXd & DecodingSsd::eigenvalues | ( | ) | const |
Definition at line 191 of file decoding_ssd.cpp.
| const MatrixXd & DecodingSsd::filters | ( | ) | const |
Definition at line 171 of file decoding_ssd.cpp.
| void DecodingSsd::fit | ( | const Eigen::Ref< const Eigen::MatrixXd > & | data, |
| double | sfreq, | ||
| double | signalLow, | ||
| double | signalHigh, | ||
| double | noiseLow, | ||
| double | noiseHigh ) |
Fit SSD from continuous data.
| [in] | data | Continuous data (n_channels × n_times). |
| [in] | sfreq | Sampling frequency in Hz. |
| [in] | signalLow | Lower edge of signal band (Hz). |
| [in] | signalHigh | Upper edge of signal band (Hz). |
| [in] | noiseLow | Lower edge of noise band (Hz). |
| [in] | noiseHigh | Upper edge of noise band (Hz). |
Definition at line 72 of file decoding_ssd.cpp.
| MatrixXd DecodingSsd::fitTransform | ( | const Eigen::Ref< const Eigen::MatrixXd > & | data, |
| double | sfreq, | ||
| double | signalLow, | ||
| double | signalHigh, | ||
| double | noiseLow, | ||
| double | noiseHigh ) |
Fit and transform in one step.
Definition at line 146 of file decoding_ssd.cpp.
| bool DecodingSsd::isFitted | ( | ) | const |
Definition at line 201 of file decoding_ssd.cpp.
| const MatrixXd & DecodingSsd::patterns | ( | ) | const |
Definition at line 181 of file decoding_ssd.cpp.
| MatrixXd DecodingSsd::transform | ( | const Eigen::Ref< const Eigen::MatrixXd > & | data | ) | const |
Apply spatial filters to data.
| [in] | data | Continuous data (n_channels × n_times). |
Definition at line 136 of file decoding_ssd.cpp.