mne.inverse_sparse.gamma_map

mne.inverse_sparse.gamma_map(evoked, forward, noise_cov, alpha, loose=0.2, depth=0.8, xyz_same_gamma=True, maxit=10000, tol=1e-06, update_mode=1, gammas=None, pca=True, return_residual=False, verbose=None)[source]

Hierarchical Bayes (Gamma-MAP) sparse source localization method.

Models each source time course using a zero-mean Gaussian prior with an unknown variance (gamma) parameter. During estimation, most gammas are driven to zero, resulting in a sparse source estimate, as in [R43] and [R44].

For fixed-orientation forward operators, a separate gamma is used for each source time course, while for free-orientation forward operators, the same gamma is used for the three source time courses at each source space point (separate gammas can be used in this case by using xyz_same_gamma=False).

Parameters:

evoked : instance of Evoked

Evoked data to invert.

forward : dict

Forward operator.

noise_cov : instance of Covariance

Noise covariance to compute whitener.

alpha : float

Regularization parameter (noise variance).

loose : float in [0, 1]

Value that weights the source variances of the dipole components that are parallel (tangential) to the cortical surface. If loose is 0 or None then the solution is computed with fixed orientation. If loose is 1, it corresponds to free orientations.

depth: None | float in [0, 1]

Depth weighting coefficients. If None, no depth weighting is performed.

xyz_same_gamma : bool

Use same gamma for xyz current components at each source space point. Recommended for free-orientation forward solutions.

maxit : int

Maximum number of iterations.

tol : float

Tolerance parameter for convergence.

update_mode : int

Update mode, 1: MacKay update (default), 2: Modified MacKay update.

gammas : array, shape=(n_sources,)

Initial values for posterior variances (gammas). If None, a variance of 1.0 is used.

pca : bool

If True the rank of the data is reduced to the true dimension.

return_residual : bool

If True, the residual is returned as an Evoked instance.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns:

stc : instance of SourceEstimate

Source time courses.

residual : instance of Evoked

The residual a.k.a. data not explained by the sources. Only returned if return_residual is True.

References

[R43](1, 2) Wipf et al. Analysis of Empirical Bayesian Methods for Neuroelectromagnetic Source Localization, Advances in Neural Information Process. Systems (2007)
[R44](1, 2) Wipf et al. A unified Bayesian framework for MEG/EEG source imaging, NeuroImage, vol. 44, no. 3, pp. 947-66, Mar. 2009.