diff options
author | Mad Physicist <madphysicist@users.noreply.github.com> | 2015-12-11 16:47:43 -0500 |
---|---|---|
committer | Mad Physicist <madphysicist@users.noreply.github.com> | 2015-12-11 16:47:43 -0500 |
commit | 41de3c2d8c84dbfa406ccb77dd67d55f555bee8a (patch) | |
tree | 93cc537351d4283e2c5131d82e2c6f14bbfb5012 /numpy/lib/function_base.py | |
parent | dcdc9dea7863685cc04ddb89c6da6e466cab3ed3 (diff) | |
download | numpy-41de3c2d8c84dbfa406ccb77dd67d55f555bee8a.tar.gz |
Updated typos in histogram bin estimator equations
In all cases, it's either ...*n^(-1/3) or .../n^(1/3), not both. The actual functions are implemented correctly.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 9261dba22..3298789ee 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -268,14 +268,14 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, large datasets respectively. Switchover point is usually x.size~1000. 'FD' (Freedman Diaconis Estimator) - .. math:: h = 2 \\frac{IQR}{n^{-1/3}} + .. math:: h = 2 \\frac{IQR}{n^{1/3}} The binwidth is proportional to the interquartile range (IQR) and inversely proportional to cube root of a.size. Can be too conservative for small datasets, but is quite good for large datasets. The IQR is very robust to outliers. 'Scott' - .. math:: h = \\frac{3.5\\sigma}{n^{-1/3}} + .. math:: h = \\frac{3.5\\sigma}{n^{1/3}} The binwidth is proportional to the standard deviation (sd) of the data and inversely proportional to cube root of a.size. Can be too conservative for small datasets, but is quite good |