ExtendedInfomax
Namespace: RTPROCESSINGLIB · Library: DSP Library
mne.preprocessing.ICA (infomax) in MNE-Python.
#include <dsp/extended_infomax.h>
class UTILSLIB::ExtendedInfomax
Extended Infomax ICA (Lee et al., 1999).
Performs Independent Component Analysis using the extended infomax algorithm, which can separate both super-Gaussian and sub-Gaussian sources.
const MatrixXd centered = mixed.colwise() - mixed.rowwise().mean(); // infomax expects zero-mean data
const InfomaxResult infomax = ExtendedInfomax::compute(centered, 3, 500, 0.1, 1e-7, true, 42); // the 0.001 default is too slow here
Static Methods
compute(matData, nComponents, maxIterations, learningRate, tolerance, extendedMode, seed)
Compute ICA decomposition using the extended infomax algorithm.
Parameters:
-
matData : const Eigen::MatrixXd & Input data matrix (n_channels x n_times), should be mean-removed.
-
nComponents : int Number of components to extract (-1 for n_channels).
-
maxIterations : int Maximum number of iterations.
-
learningRate : double Learning rate for weight updates.
-
tolerance : double Convergence tolerance.
-
extendedMode : bool If true, use extended mode (sub- and super-Gaussian).
-
seed : unsigned int Random seed (0 for no seeding).
Returns:
- InfomaxResult —
InfomaxResultcontaining unmixing/mixing matrices and sources.
Example
- Full source:
src/examples/ex_dsp_preprocessing/main.cpp - Build target:
ex_dsp_preprocessing(runs under CTest)
Used in examples
ex_dsp_preprocessing
Preprocessing tools of the dsp library on synthetic data with a known ground truth.
const MatrixXd centered = mixed.colwise() - mixed.rowwise().mean(); // infomax expects zero-mean data
const InfomaxResult infomax = ExtendedInfomax::compute(centered, 3, 500, 0.1, 1e-7, true, 42); // the 0.001 default is too slow here
ok &= expect(infomax.converged && worstRecovery(infomax.matSources, sources) > 0.99,
QString("extended Infomax recovers the sub-Gaussian sources (worst |r| %1)").arg(worstRecovery(infomax.matSources, sources)));
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>