The Inverse library provides source localization algorithms for MEG/EEG data. All classes reside in the INVLIB namespace.
Algorithm Inventory
Minimum Norm Estimation
| Class | Description | MNE-Python | MNE-C |
|---|
InvMinimumNorm | MNE, dSPM, sLORETA, and eLORETA inverse methods | mne.minimum_norm.apply_inverse | mne_inverse_operator + mne_compute_mne |
Supports all four noise-normalization strategies:
| Method | Description |
|---|
| MNE | L2-regularized minimum-norm estimate |
| dSPM | Dynamic Statistical Parametric Mapping — noise-normalized MNE |
| sLORETA | Standardized Low-Resolution Electromagnetic Tomography |
| eLORETA | Exact LORETA — iterative weight-normalized MNE for zero localization bias |
| Class | Description | MNE-Python | MNE-C |
|---|
InvLCMV | Linearly Constrained Minimum Variance beamformer (time domain) | mne.beamformer.make_lcmv / apply_lcmv | — |
InvDICS | Dynamic Imaging of Coherent Sources (frequency domain) | mne.beamformer.make_dics / apply_dics | — |
InvBeamformer | Computed spatial filter container | — | — |
InvBeamformerCompute | Shared computation routines (data covariance → spatial filter) | — | — |
RAP MUSIC
| Class | Description | MNE-Python | MNE-C |
|---|
InvRapMusic | Recursively Applied and Projected Multiple Signal Classification | mne.beamformer.rap_music | — |
InvPwlRapMusic | Powell-accelerated RAP MUSIC with gradient-free dipole optimization | — | — |
InvDipole | Single dipole result (position, orientation, correlation) | — | — |
Contextual Minimum Norm Estimates (CMNE)
| Class | Description | MNE-Python | MNE-C |
|---|
InvCMNE | CMNE inverse: dSPM base estimate refined by LSTM network (ONNX Runtime) | — | — |
InvCMNESettings | Configuration for CMNE: ONNX model path, sequence length, LSTM parameters | — | — |
Combines classical dSPM with a trained LSTM neural network to incorporate temporal context. At inference time, InvCMNE::compute() runs dSPM to obtain a base source estimate, then applies the ONNX-exported LSTM model sample-by-sample to produce a spatiotemporally refined CMNE result. Falls back to moving-average smoothing if no ONNX model is available.
Reference: Dinh et al. (2021). Contextual Minimum-Norm Estimates (CMNE): A Deep Learning Method for Source Estimation in Neuronal Networks. Frontiers in Neuroscience, 15, 552666. DOI: 10.3389/fnins.2021.552666
Sparse Methods
| Class | Description | MNE-Python | MNE-C |
|---|
InvMxne | Mixed-Norm Estimate (MxNE) — L21-norm sparse inverse via IRLS | mne.inverse_sparse.mixed_norm | — |
InvMxneResult | Result container: sparse source estimate, active vertices, iteration count, residual | — | — |
InvGammaMap | Gamma-MAP sparse Bayesian learning inverse via EM | mne.inverse_sparse.gamma_map | — |
InvGammaMapResult | Result container: sparse source estimate, active vertices, gamma hyperparameters | — | — |
MxNE minimizes a group-lasso (ℓ2,1-norm) cost function using iteratively reweighted least squares with active-set pruning. Gamma-MAP uses an EM algorithm to estimate per-source variance hyperparameters, pruning sources below a configurable threshold.
Dipole Fitting
| Class | Description | MNE-Python | MNE-C |
|---|
InvDipoleFit | High-level driver for sequential ECD fitting | mne.fit_dipole | mne_dipole_fit |
InvDipoleFitData | Workspace: sensor geometry, forward model, noise covariance, fit routines | — | libmne internals |
InvDipoleFitSettings | Command-line and programmatic settings | — | mne_dipole_fit options |
InvDipoleForward | Forward field matrices and SVD for magnetic dipole fitting | — | libfwd |
InvGuessData | Precomputed guess-point grid with forward fields | — | libmne |
InvEcd | Single equivalent current dipole (position, orientation, amplitude, GOF) | mne.Dipole | — |
InvEcdSet | Collection of fitted dipoles | mne.DipoleFixed | — |
HPI Fitting
| Class | Description | MNE-Python | MNE-C |
|---|
InvHpiFit | HPI coil dipole fitting for head position tracking | mne.chpi.compute_head_pos | — |
InvHpiDataUpdater | Preprocesses raw HPI data (SSP, compensation, model fitting) | mne.chpi.compute_chpi_amplitudes | — |
InvHpiModelParameters | Configuration for HPI signal model (line freq, coil freqs, sample rate) | — | — |
InvSignalModel | Forward sinusoidal model matrix for HPI coil signals | — | — |
InvSensorSet | MEG sensor geometry container for HPI | — | — |
Result Types
| Class / Enum | Description |
|---|
InvSourceEstimate | Source estimate container (vertices × time, with time metadata) |
InvSourceEstimateToken | Tokenization / de-tokenization for foundation-model interfacing |
InvFocalDipole | Focal dipole with free 3D position, moment, and fit-quality metrics |
InvSourceCoupling | Correlated grid sources with orientations and correlation matrix |
InvConnectivity | Pairwise source connectivity matrix |
InvEstimateMethod | Enum: MNE, dSPM, sLORETA, eLORETA, CMNE, LCMV, DICS, SAM, MxNE, GammaMAP, DipoleFit, RapMusic, PwlRapMusic |
Doxygen Reference
For method signatures, inheritance diagrams, and source-level documentation see the auto-generated INVLIB namespace in the Doxygen API reference.
See Also