Matching Pursuit#

class invert.solvers.matching_pursuit.SolverCOSAMP(name='Compressed Sampling Matching Pursuit', **kwargs)#
Class for the Compressed Sampling Matching Pursuit (CoSaMP) inverse

solution [1]. The algorithm as described in [2] was used for this imlementation.

References

[1] Needell, D., & Tropp, J. A. (2009). CoSaMP: Iterative signal recovery from incomplete and inaccurate samples. Applied and computational harmonic analysis, 26(3), 301-321.

[2] Duarte, M. F., & Eldar, Y. C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on signal processing, 59(9), 4053-4085.

apply_inverse_operator(mne_obj, K='auto', rv_thresh=1) mne.source_estimate.SourceEstimate#

Apply the inverse operator.

Parameters

mne_obj ([mne.Evoked, mne.Epochs, mne.io.Raw]) – The MNE data object.

Returns

stc – The mne Source Estimate object

Return type

mne.SourceEstimate

calc_cosamp_solution(y, K='auto', rv_thresh=1)#

Calculates the CoSaMP inverse solution.

Parameters
  • y (numpy.ndarray) – The data matrix (channels, time).

  • K (int) – Positive integer determining the sparsity of the reconstructed signal.

  • rv_thresh (float) – The residual variance threshold as a stopping criterion. The smaller, the sooner the atom search is considered complete, i.e., the less of the data is fitted. It can therefore be used for regularization.

Returns

x_hat – The inverse solution (dipoles, time)

Return type

numpy.ndarray

make_inverse_operator(forward, *args, alpha='auto', verbose=0, **kwargs)#

Calculate inverse operator.

Parameters
  • forward (mne.Forward) – The mne-python Forward model instance.

  • alpha (float) – The regularization parameter.

Returns

self

Return type

object returns itself for convenience

class invert.solvers.matching_pursuit.SolverOMP(name='Orthogonal Matching Pursuit', **kwargs)#
Class for the Orthogonal Matching Pursuit (OMP) inverse solution [1].

The algorithm as described by [2] was implemented.

References

[1] Tropp, J. A., & Gilbert, A. C. (2007). Signal recovery from random measurements via orthogonal matching pursuit. IEEE Transactions on information theory, 53(12), 4655-4666.

[2] Duarte, M. F., & Eldar, Y. C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on signal processing, 59(9), 4053-4085.

apply_inverse_operator(mne_obj, K=1) mne.source_estimate.SourceEstimate#

Apply the inverse operator. :param mne_obj: The MNE data object. :type mne_obj: [mne.Evoked, mne.Epochs, mne.io.Raw]

Returns

stc – The mne Source Estimate object

Return type

mne.SourceEstimate

calc_omp_solution(y, K=1)#

Calculates the Orthogonal Matching Pursuit (OMP) inverse solution.

Parameters
  • y (numpy.ndarray) – The data matrix (channels,).

  • K (int) – The number of atoms to select per iteration.

Returns

x_hat – The inverse solution (dipoles,)

Return type

numpy.ndarray

make_inverse_operator(forward, *args, alpha='auto', **kwargs)#

Calculate inverse operator.

Parameters
  • forward (mne.Forward) – The mne-python Forward model instance.

  • alpha (float) – The regularization parameter.

Returns

self

Return type

object returns itself for convenience

class invert.solvers.matching_pursuit.SolverREMBO(name='Reduce Multi-Measurement-Vector and Boost', **kwargs)#
Class for the Reduce Multi-Measurement-Vector and Boost (ReMBo) inverse

solution [1]. The algorithm as describe in [2] was used for the imlpementation.

forward#

The mne-python Forward model instance.

Type

mne.Forward

References

[1] Mishali, M., & Eldar, Y. C. (2008). Reduce and boost: Recovering arbitrary sets of jointly sparse vectors. IEEE Transactions on Signal Processing, 56(10), 4692-4702. [2] Duarte, M. F., & Eldar, Y. C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on signal processing, 59(9), 4053-4085.

apply_inverse_operator(mne_obj, K=1) mne.source_estimate.SourceEstimate#

Apply the REMBO inverse solution.

Parameters
  • mne_obj ([mne.Evoked, mne.Epochs, mne.io.Raw]) – The MNE data object.

  • K (int) – The number of atoms to select per iteration.

Returns

stc – The source estimate containing the inverse solution.

Return type

mne.SourceEstimate

calc_omp_solution(y, K=1)#

Calculates the Orthogonal Matching Pursuit (OMP) inverse solution.

Parameters
  • y (numpy.ndarray) – The data matrix (channels,).

  • K (int) – The number of atoms to select per iteration.

Returns

x_hat – The inverse solution (dipoles,)

Return type

numpy.ndarray

calc_rembo_solution(y, K=1)#
Calculate the REMBO inverse solution based on the measurement vector
Parameters
  • y (numpy.ndarray) – The EEG matrix (channels, time)

  • K (int) – The number of atoms to select per iteration.

Returns

x_hat – The source matrix (dipoles, time)

Return type

numpy.ndarray

make_inverse_operator(forward, *args, alpha='auto', verbose=0, **kwargs)#

Calculate inverse operator.

Parameters
  • forward (mne.Forward) – The mne-python Forward model instance.

  • alpha (float) – The regularization parameter.

Returns

self

Return type

object returns itself for convenience

class invert.solvers.matching_pursuit.SolverSOMP(name='Simultaneous Orthogonal Matching Pursuit', **kwargs)#
Class for the Simultaneous Orthogonal Matching Pursuit (S-OMP) inverse

solution.

References

[1] Duarte, M. F., & Eldar, Y. C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on signal processing, 59(9), 4053-4085.

[2] Donoho, D. L. (2006). Compressed sensing. IEEE Transactions on information theory, 52(4), 1289-1306.

apply_inverse_operator(mne_obj, K=1) mne.source_estimate.SourceEstimate#

Apply the inverse operator. :param mne_obj: The MNE data object. :type mne_obj: [mne.Evoked, mne.Epochs, mne.io.Raw]

Returns

stc – The mne Source Estimate object

Return type

mne.SourceEstimate

calc_somp_solution(y, K)#

Calculates the S-OMP inverse solution.

Parameters
  • y (numpy.ndarray) – The data matrix (channels, time).

  • K (int) – The number of atoms to select per iteration.

Returns

x_hat – The inverse solution (dipoles, time)

Return type

numpy.ndarray

make_inverse_operator(forward, *args, alpha='auto', **kwargs)#

Calculate inverse operator.

Parameters
  • forward (mne.Forward) – The mne-python Forward model instance.

  • alpha (float) – The regularization parameter.

Returns

self

Return type

object returns itself for convenience

class invert.solvers.matching_pursuit.SolverSP(name='Subspace Pursuit', **kwargs)#
Class for the Subspace Pursuit (SP) inverse solution [1]. The algorithm

as described by [2] was implemented.

forward#

The mne-python Forward model instance.

Type

mne.Forward

References

[1] Dai, W., & Milenkovic, O. (2009). Subspace pursuit for compressive sensing signal reconstruction. IEEE transactions on Information Theory, 55(5), 2230-2249.

[2] Duarte, M. F., & Eldar, Y. C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on signal processing, 59(9), 4053-4085.

apply_inverse_operator(mne_obj, K=1) mne.source_estimate.SourceEstimate#

Apply the SP inverse solution.

Parameters
  • mne_obj ([mne.Evoked, mne.Epochs, mne.io.Raw]) – The MNE data object.

  • K (int) – The number of atoms to select per iteration.

Returns

stc – The source estimate containing the inverse solution.

Return type

mne.SourceEstimate

calc_sp_solution(y, K='auto')#

Calculates the Orthogonal Matching Pursuit (OMP) inverse solution.

Parameters
  • y (numpy.ndarray) – The data matrix (channels,).

  • K (["auto", int]) – The number of atoms to select per iteration.

Returns

x_hat – The inverse solution (dipoles,)

Return type

numpy.ndarray

make_inverse_operator(forward, *args, alpha='auto', verbose=0, **kwargs)#

Calculate inverse operator.

Parameters
  • forward (mne.Forward) – The mne-python Forward model instance.

  • alpha (float) – The regularization parameter.

Returns

self

Return type

object returns itself for convenience

class invert.solvers.matching_pursuit.SolverSSP(name='Simultaneous Subspace Pursuit', **kwargs)#

Class for the Simultaneous Subspace Pursuit (SSP) inverse solution.

References

[1] Dai, W., & Milenkovic, O. (2009). Subspace pursuit for compressive sensing signal reconstruction. IEEE transactions on Information Theory, 55(5), 2230-2249.

[2] Duarte, M. F., & Eldar, Y. C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on signal processing, 59(9), 4053-4085.

apply_inverse_operator(mne_obj, K=1) mne.source_estimate.SourceEstimate#

Apply the SSP inverse solution.

Parameters
  • mne_obj ([mne.Evoked, mne.Epochs, mne.io.Raw]) – The MNE data object.

  • K (int) – The number of atoms to select per iteration.

Returns

stc – The source estimate containing the inverse solution.

Return type

mne.SourceEstimate

calc_ssp_solution(y, K='auto')#

Calculates the Orthogonal Matching Pursuit (OMP) inverse solution.

Parameters
  • y (numpy.ndarray) – The data matrix (channels,).

  • K (["auto", int]) – The number of atoms to select per iteration.

Returns

x_hat – The inverse solution (dipoles,)

Return type

numpy.ndarray

make_inverse_operator(forward, *args, alpha='auto', verbose=0, **kwargs)#

Calculate inverse operator.

Parameters
  • forward (mne.Forward) – The mne-python Forward model instance.

  • alpha (float) – The regularization parameter.

Returns

self

Return type

object returns itself for convenience