GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Boxplot - wrong median · Issue #184 · matplotlib/matplotlib Closed DescriptionOriginal report at SourceForge, opened Tue Jan 4 04:52:13 2011 If the boxplot is called with a small number of discrete, not unique values it shows a different median value than the median command. I consider this a bug. How to reproduce: example datad = array([ 13., 9., 16., 8., 7., 14., 15., 5., 10., 16., 8., 15., 14., 19., 10., 10.], dtype=float32) In the example I took the line in axes.py where the median value is computed and compare to a median directly computed. In my opinion the boxplot should use the median function to determine the median such that the same value is reported. I think the reason is in the different handling of equal values of prctile and median. Anyway: Here is how to fix it: SourceForge CommentsOn Thu Jan 13 04:42:32 2011, jmdb wrote:And to add another point: matlab reports 8.5 for q1. On Thu Jan 13 04:37:33 2011, jmdb wrote:In addition: if one also computes: results in 8.75 while q1 from the example (which should be the same) is 9.0 I think either the mlab.prctle function should be fixed or be replaced by the function from the stats package. On Tue Jan 4 05:03:55 2011, jmdb wrote:Seems like this is also discussed here: http://permalink.gmane.org/gmane.comp.python.matplotlib.general/25835 I can add that the median function agrees with f.ex. matlab while the prctile function gives different results. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |