mne.minimum_norm.
estimate_snr
(evoked, inv, verbose=None)[source]¶Estimate the SNR as a function of time for evoked data.
Parameters: | evoked : instance of Evoked
inv : instance of InverseOperator
verbose : bool, str, int, or None
|
---|---|
Returns: | snr : ndarray, shape (n_times,)
snr_est : ndarray, shape (n_times,)
|
Notes
snr_est
is estimated by using different amounts of inverse
regularization and checking the mismatch between predicted and
measured whitened data.
In more detail, given our whitened inverse obtained from SVD:
The values in the diagonal matrix Gamma are expressed in terms of the chosen regularization lambdaapproxfrac1rmSNR2 and singular values lambdak as:
We also know that our predicted data is given by:
And thus our predicted whitened data is just:
Where Pi is diagonal with entries entries:
If we use no regularization, note that Pi is just the identity matrix. Here we test the squared magnitude of the difference between unregularized solution and regularized solutions, choosing the biggest regularization that achieves a chi2-test significance of 0.001.
New in version 0.9.0.