[SciPy-Dev] changing default for median_absolute_deviation

Lucas Roberts rlucas7 at vt.edu
Sun Feb 16 21:35:59 EST 2020


Hi scipy-dev,

Looking for guidance if the change warrants ignoring deprecation policy or
if I should create a deprecation warning for existing behavior to change
defaults in median_absolute_deviation()

PR:
https://github.com/scipy/scipy/pull/11431

[CONTEXT]
In this PR:
https://github.com/scipy/scipy/pull/9637
the median_absolute_deviation() function was added to scipy.stats
the function takes in a scale argument that allows for a robust estimator
of the scale (robust to outliers). The choice of scale constant assuming
normal input data seemed reasonable to me at the time.
However, in this PR:
https://github.com/scipy/scipy/issues/11090
a few thought otherwise and we came to the conclusion that the default
scale should be 1 which would also ensure internal consistency with the
stats.iqr() function (similar signature and functionality).

I've opened a PR to change the defaults here:
https://github.com/scipy/scipy/pull/11431
and pinged those on the 11090 issue.

[ON DEPRECATION]:

[REASON FOR]
Main reason to not follow deprecation policy are:
1. Following deprecation policy would maintain existing confusing behavior
for up to 1 year from now.
2. Function released in 1.3.0 so somewhat new
3. Seems the default is confusing users and is non-obvious and inconsistent
with iqr() default

[REASON NOT]
1. Some users may depend on existing default
2. Defaults with normal scaling exist in several places (c.f. 11090 issue
comments)
3. Deprecation warning needs to be done to give fair warning of the change.

[COMMENTS]
I haven't much experience here with deprecations, when to do it vs consider
a defect so would appreciate any guidance.

If we think the deprecation cycle should follow, should I leave the PR and
open a separate deprecation PR?
https://github.com/scipy/scipy/pull/11431
Alternately could revert changes and convert to a deprecation warning PR.

Thanks in advance.
-- 
-Lucas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20200216/3f72c5fb/attachment.html>


More information about the SciPy-Dev mailing list