REF: Deprecate stand_mad. Add center keyword to mad. Closes #658. #1107

Merged
merged 2 commits into from Oct 23, 2013

Projects

None yet

4 participants

@jseabold
Member
jseabold commented Oct 9, 2013

We need to add a version0.6.rst to docs/source/release and note that this change is backwards incompatible. It changes the default behavior of mad, but it changes it something that most people actually expect...

@coveralls

Coverage Status

Coverage remained the same when pulling 9415057 on jseabold:robust-mad-refactor into 3b7082c on statsmodels:master.

@rgommers rgommers and 1 other commented on an outdated diff Oct 10, 2013
statsmodels/robust/__init__.py
@@ -2,7 +2,7 @@
Robust statistical models
"""
import norms
-from .scale import mad, stand_mad, Huber, HuberScale, hubers_scale
@rgommers
rgommers Oct 10, 2013 Member

Doesn't this break the API? I think you need to leave it here till you remove it for 0.7

@jseabold
jseabold Oct 10, 2013 Member

Good point. Fixed.

@rgommers
Member

+1

@coveralls

Coverage Status

Coverage remained the same when pulling dd5cb3e on jseabold:robust-mad-refactor into 3b7082c on statsmodels:master.

@josef-pkt josef-pkt commented on an outdated diff Oct 23, 2013
statsmodels/robust/robust_linear_model.py
@@ -187,9 +187,10 @@ def _estimate_scale(self, resid):
"""
if isinstance(self.scale_est, str):
if self.scale_est.lower() == 'mad':
- return scale.mad(resid)
- if self.scale_est.lower() == 'stand_mad':
- return scale.stand_mad(resid)
@josef-pkt
josef-pkt Oct 23, 2013 Member

I would also deprecate stand_mad here, and keep it as alias for the new mad for one release.

Users that currently use 'mad' explicitly, will have a change of behavior if center is not zero.

@josef-pkt
Member

milestone 0.6, not for 0.5.1

@coveralls

Coverage Status

Coverage remained the same when pulling e82c51e on jseabold:robust-mad-refactor into 3b7082c on statsmodels:master.

@jseabold
Member

Rebased.

@jseabold jseabold merged commit ea61f86 into statsmodels:master Oct 23, 2013
@jseabold jseabold deleted the jseabold:robust-mad-refactor branch Oct 23, 2013
@josef-pkt josef-pkt referenced this pull request Jan 24, 2014
Open

perfect fit (in rlm) #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment