erfanzabeh / WaveMonk

Detection and Quantification of Traveling Wave in Monkey Utah array recordings
5 stars 0 forks source link

Incorect PGD Index equation #4

Open dervinism opened 11 months ago

dervinism commented 11 months ago

Are you using the correct PGD Index equation in the code? The one that is in the paper is different. It seems that the following lines in the GradientMethod function

Mag_of_MeanGrad = sqrt(sum(nansum(Gx(:,:,TrailTime)))^2+sum(nansum(Gy(:,:,TrailTime)))^2);
Mean_of_MagGrad = sum(nansum(sqrt(Gx(:,:,TrailTime).^2+Gy(:,:,TrailTime).^2)));
PGD(TrailTime) = Mag_of_MeanGrad/Mean_of_MagGrad; 

should be replaced with this line

PGD(TrailTime) = (sum(nansum(Gx(:,:,TrailTime).*Gy(:,:,TrailTime))))/sqrt(sum(nansum(Gx(:,:,TrailTime).^2))*sum(nansum(Gy(:,:,TrailTime).^2)));
OccassionalBioinformatician commented 7 months ago

@dervinism Sorry? The equation of PGD is given in Rubino (2006; p. 1555) and the original code is accurate.

Zabeh, et al. (2022; p. 10) incorrectly labels the Pearson Correlation Coefficient as PGD. For what it's worth, I do not see any code in this package that allows us to evaluate the goodness of fit by such a calculation; we need to do it by ourselves.