Back to the main page.

Bug 3351 - Errors in eLoreta code

Status ASSIGNED
Reported 2017-09-19 20:56:00 +0200
Modified 2017-11-09 17:32:29 +0100
Product: FieldTrip
Component: inverse
Version: unspecified
Hardware: All
Operating System: All
Importance: P5 major
Assigned to: Ricardo Bruña Fernández
URL:
Tags:
Depends on:
Blocks:
See also:

Ricardo Bruña Fernández - 2017-09-19 20:56:50 +0200

Guido Nolte's code for eLoreta (inverse/private/mkfilt_eloreta_v2.m). The main ones are: * The matrix M in line 52 is calculated using the inverse instead of the pseudo-inverse. Pascual-Marqui states in arXiv 0710.3341 equation 44 that the pseudo-inverse should be used here. * The exit condition of the iterative method in line 62 compares the matrix W with the matrix one iteration before. However, as the old W matrix is updated every dipole calculation, the matrix is comparing almost with itself (except for the last dipole). The update of Wold should be taken out of the loop.


Jan-Mathijs Schoffelen - 2017-11-09 17:32:29 +0100

This code has been taken from Guido, I suggest you discuss with him these implementation details. With respect to your first point: the inversion is done on a regularized matrix, which is very similar to taking the moore-penrose pseudoinverse, so no problem here, I'd say. With respect to your second point: you might be right. Please suggest a fix by means of a PR on github. See www.fieldtriptoolbox.org/development/git for instructions