Skip to content

Rename mad() in mean_absolute_deviation() #31742

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

Closed
michaeldorner opened this issue Feb 6, 2020 · 3 comments
Closed

Rename mad() in mean_absolute_deviation() #31742

michaeldorner opened this issue Feb 6, 2020 · 3 comments

Comments

@michaeldorner
Copy link

Problem description

MAD is a overloaded shortcut: It stands for Median Absolute Deviation (more common), but also can be used as Mean Absolute Deviation (which is used in pandas).

Expected Output

To avoid confusion, the method should be renamed from .mad() to .mean_absolute_deviation(), and when implemented the more commonly used .median_absolute_deviation().

If you are fine with it, I would kick off a PR.

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit           : None
python           : 3.7.3.final.0
python-bits      : 64
OS               : Linux
OS-release       : 5.3.0-24-generic
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : en_US.UTF-8
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.0
numpy            : 1.17.0
pytz             : 2019.2
dateutil         : 2.8.0
pip              : 19.2.3
setuptools       : 41.0.1
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : 4.4.0
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.10.1
IPython          : 7.7.0
pandas_datareader: None
bs4              : None
bottleneck       : None
fastparquet      : None
gcsfs            : None
lxml.etree       : 4.4.0
matplotlib       : 3.1.1
numexpr          : 2.6.9
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : None
scipy            : 1.3.1
sqlalchemy       : 1.3.6
tables           : 3.5.2
xarray           : None
xlrd             : 1.2.0
xlwt             : None
xlsxwriter       : None
@MarcoGorelli
Copy link
Member

Thanks @michaeldorner for your suggestion.

I think you're right that MAD is more commonly used for "median absolute deviation" than "mean absolute deviation".

I'll close this issue as it looks like a duplicate of #11787 - the issue is still open though, and it seems the core team would be open to this, so if you'd like to submit a PR it would be welcome!

@jreback
Copy link
Contributor

jreback commented Feb 6, 2020

i think we have another issue about depreciating mad entirely

@michaeldorner
Copy link
Author

So there is no replacement for this method anyway?

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

No branches or pull requests

3 participants