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

Statistics Review: cmedian (Trac #53) #580

Closed
scipy-gitbot opened this issue Apr 25, 2013 · 2 comments
Closed

Statistics Review: cmedian (Trac #53) #580

scipy-gitbot opened this issue Apr 25, 2013 · 2 comments

Comments

@scipy-gitbot
Copy link

Original ticket http://projects.scipy.org/scipy/ticket/53 on 2006-04-02 by @rkern, assigned to @rkern.

The function cmedian in file source:trunk/Lib/stats/stats.py needs review.

Please look over the StatisticsReview guidelines and add your comments below.

@scipy-gitbot
Copy link
Author

@rkern wrote on 2006-04-10

The test for cmedian was changed in ad1b0f2 to address a bugfix in the underlying histogram() routine.

This function, as written, is pretty much obsoleted by the ndarray.median() method. I can't think of a place where it would be preferred.

However, a simple rewriting could make it useful again. Instead of operating on a raw dataset, it could operate on already histogrammed data. I'm sure there are some situations where a histogram is available but the raw data is not. I would suggest, though, that we create a Histogram class that encapsulates all of the information that represents a histogram. Then the histogram versions of cmedian, scoreatpercentile, percentileofscore, and probably a couple others, can be methods on this class.

@josef-pkt
Copy link
Member

@rgommers another possible candidate for deprecation
I sent a mail to the dev list

Note: It won't be possible to change the function in a backwards compatible way to follow the last suggestion above, to calculate some statistics directly from histogram data.

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

2 participants