Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

median_absolute_deviation is deprecated #43

Closed
devanshkv opened this issue Oct 6, 2020 · 3 comments
Closed

median_absolute_deviation is deprecated #43

devanshkv opened this issue Oct 6, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@devanshkv
Copy link
Member

devanshkv commented Oct 6, 2020

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)
@devanshkv devanshkv added the bug Something isn't working label Oct 6, 2020
@KshitijAggarwal
Copy link
Collaborator

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.

@devanshkv
Copy link
Member Author

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

@devanshkv
Copy link
Member Author

Done with 939db5e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants