Back to the main page.

Bug 1829 - rank deficient warning in beamformer_* and Maxfilter data

Status CLOSED FIXED
Reported 2012-11-12 14:31:00 +0100
Modified 2013-01-16 15:05:29 +0100
Product: FieldTrip
Component: inverse
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Johanna
URL:
Tags:
Depends on:
Blocks:
See also:

Johanna - 2012-11-12 14:31:25 +0100

I received a further email from Hyojin Park off-list via Ole, still with questions on the need of regularization with SSS Maxfilter data, and regarding the warning of rank-deficient data. 1) Currently the warning of rank deficiency is given regardless of lambda. Perhaps this is misleading, since the actual value being inverted in pinv to create InvCy may not be rank-deficient, depending on lambda. Perhaps the warning should only be given if the matrix being inverted is rank-deficient? Ole suggests this modification, as then it would allow a person to titrate a lambda value to just big enough to give a full rank, but not any larger. 2) My impression is that lambda is not needed even if the matrix is not full rank, as FT uses pinv, which only inverts the 'rank rich' components of the matrix. Is this correct? A quick test I did with random data showed that using 5% lambda versus the minimal needed to make full rank gave roughly the same result (just a magnitude differnce but not spatial difference) whereas the output of pinv alone on a rank-deficient matrix showed quick a different pattern.


Robert Oostenveld - 2012-11-12 15:43:24 +0100

we could just remove the warning altogether.


Johanna - 2012-11-12 16:06:32 +0100

I guess what I meant to ask related to part (2) is, how to determine which is the 'better' inversion result for a rank-deficient matrix?


Robert Oostenveld - 2012-11-12 16:36:44 +0100

the present implementation uses a truncated SVD to do the inversion for numerical reasons. The regularization with the labmda is not meant to solve the limited rank (as it does not need to be solved), but to improve the noise estimate in the data covariance. It results in more robust spatial filters in the case of a noisy noise estimate. It also causes the source reconstructions to be more blurred (assuming you scan over a 3D grid). That can be an advantage, either when the noise estimate is poor, or for group statistics. I think if you remove the warning, the question would not have arisen. The question "what is a good regularization parameter?" is not a bug and should not be discussed here.


Johanna - 2012-11-12 17:58:47 +0100

svn commit 6909, removed warning from all 4 beamformer_*.m functions. Thank you for the extra comments. I have indeed already told Hyojin that a greater lambda will help against noisy data, and that it will lead to spatially blurrier source localization results (siminar to min-norm).