v2.0.0
Loading...
Searching...
No Matches
inv_cmne.h File Reference

Contextual Minimum-Norm Estimate (CMNE) inverse solver — deep-learning-corrected dSPM (Dinh et al. 2021). More...

#include "../inv_global.h"
#include "../inv_source_estimate.h"
#include "inv_cmne_settings.h"
#include <Eigen/Core>
#include <Eigen/Dense>
Include dependency graph for inv_cmne.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  INVLIB::InvCMNEResult
 CMNE result. More...
class  INVLIB::InvCMNE
 CMNE inverse solver. More...

Namespaces

namespace  UTILSLIB
 Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
namespace  INVLIB
 Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).

Detailed Description

Contextual Minimum-Norm Estimate (CMNE) inverse solver — deep-learning-corrected dSPM (Dinh et al. 2021).

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.0
Date
April 2026

INVLIB::InvCMNE implements the CMNE algorithm of Dinh et al., Contextual Minimum-Norm Estimates: A Deep Learning Method for Source Estimation in Neuroimaging, 2021. The static compute method combines a closed-form dSPM kernel with an LSTM correction step that runs in ONNX Runtime: dSPM is computed first, the time-courses are z-scored and rectified, an LSTM consumes a sliding lookBack window of past time samples and outputs the contextual correction, and the final CMNE estimate is the LSTM-modulated dSPM. The trainLstm helper drives the Python training pipeline (scripts/ml/training/train_cmne_lstm.py) through UTILSLIB::PythonRunner so the full train-and-deploy cycle is reachable from C++ without leaving the mne-cpp process.

Definition in file inv_cmne.h.