v2.0.0
Loading...
Searching...
No Matches
decoding_spoc.cpp File Reference

Implementation of the Source Power Comodulation regression decoder. More...

#include "decoding_spoc.h"
#include <Eigen/Eigenvalues>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <stdexcept>
Include dependency graph for decoding_spoc.cpp:

Go to the source code of this file.

Detailed Description

Implementation of the Source Power Comodulation regression decoder.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.2.1
Date
May 2026

Builds the unweighted trial-mean covariance \(\Sigma\) and the target-weighted covariance \(\Sigma_z\) from centred labels, solves the generalised eigenproblem \(\Sigma_z w = \lambda \Sigma w\) with Eigen's GeneralizedSelfAdjointEigenSolver, and keeps the n_components eigenvectors with the largest absolute eigenvalues as spatial filters. Activation patterns are computed as the columns of the pseudoinverse of the filter matrix and stored alongside the per- component mean and standard deviation of the band-power features so that subsequent calls to DecodingSpoc::transform can z-score on demand without re-fitting.

The feature path is identical in shape to DecodingCsp: epochs are filtered with the stored spatial filters, then either reduced to one (optionally log- or z-scored) band-power value per component (AveragePower) or returned in time-resolved form (CspSpace). The continuous-regression nature of SPoC is entirely captured by the use of the target-weighted covariance during fit; downstream the output is just a deterministic feature matrix consumable by any linear regressor.

Definition in file decoding_spoc.cpp.