summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.py
diff options
context:
space:
mode:
authorguoci <zguoci@gmail.com>2018-11-20 13:29:24 -0500
committerguoci <zguoci@gmail.com>2018-11-20 13:29:24 -0500
commitb0b07cabd11510e03cc42d6f66ecebb6eb5f10a4 (patch)
tree31f53c5441f6941c2844b5bf833ed27310cfc635 /numpy/lib/histograms.py
parentc3c6cd5e70e1f10ce374fb580debc846922a9232 (diff)
downloadnumpy-b0b07cabd11510e03cc42d6f66ecebb6eb5f10a4.tar.gz
resolve issues from review
Diffstat (limited to 'numpy/lib/histograms.py')
-rw-r--r--numpy/lib/histograms.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py
index 6666d8628..482eabe14 100644
--- a/numpy/lib/histograms.py
+++ b/numpy/lib/histograms.py
@@ -111,7 +111,7 @@ def _hist_bin_scott(x, range):
return (24.0 * np.pi**0.5 / x.size)**(1.0 / 3.0) * np.std(x)
-def _hist_bin_ise(x, range):
+def _hist_bin_stone(x, range):
"""
Histogram bin estimator based on minimizing the estimated integrated squared error (ISE).
@@ -119,6 +119,9 @@ def _hist_bin_ise(x, range):
The ISE is estimated using cross-validation and can be regarded as a generalization of Scott's rule.
https://en.wikipedia.org/wiki/Histogram#Scott.27s_normal_reference_rule
+ This paper by Stone appears to be the origination of this rule.
+ http://digitalassets.lib.berkeley.edu/sdtr/ucb/text/34.pdf
+
Parameters
----------
x : array_like
@@ -258,7 +261,7 @@ def _hist_bin_auto(x, range):
return sturges_bw
# Private dict initialized at module load time
-_hist_bin_selectors = {'stone': _hist_bin_ise,
+_hist_bin_selectors = {'stone': _hist_bin_stone,
'auto': _hist_bin_auto,
'doane': _hist_bin_doane,
'fd': _hist_bin_fd,