thepetabyteproject / your

Your Unified Reader

Home Page:https://thepetabyteproject.github.io/your/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

median_absolute_deviation is deprecated

devanshkv opened this issue · comments

your/utils/rfi.py:77: DeprecationWarning: median_absolute_deviation is deprecated, use median_abs_deviation instead!

To preserve the existing default behavior, use
scipy.stats.median_abs_deviation(..., scale=1/1.4826).
The value 1.4826 is not numerically precise for scaling
with a normal distribution. For a numerically precise value, use
scipy.stats.median_abs_deviation(..., scale='normal').

std = 1.4826 * stats.median_absolute_deviation(sk_c)

uh oh, seems like median_absolute_deviation never actually was returning the MAD value, it was already returning std. See this. This is why they deprecated that function.
but this is very bad, as the std deviation calculations we've done so far are incorrect, or rather higher by a factor of 1.4826.

@jkania7 @josephwkania might want to have a look at this and run some tests.

Done with 939db5e.