gdetor / SPySort

Spike sorting software
Other
5 stars 5 forks source link

Mean abosolute deviation function return standard deviation estimate #1

Open subhacom opened 9 years ago

subhacom commented 9 years ago

The function definition functions.py/mad(x) seems to estimate the standard deviation rather than MAD (http://en.wikipedia.org/wiki/Median_absolute_deviation#Relation_to_standard_deviation). The code returns 1.4826 * np.median(np.abs(x - np.median(x))) and this is the estimate of the standard deviation according to the wikipedia article. By definition, formula for MAD should be np.median(np.abs(x - np.median(x))).