Rice histogram bin estimator. Another simple estimator with no normality assumption. It has better performance for large data than Sturges, but tends to overestimate the number of bins. The number of bins is proportional to the cube root of data size (asymptotically optimal). T
(x, range)
| 74 | |
| 75 | |
| 76 | def _hist_bin_rice(x, range): |
| 77 | """ |
| 78 | Rice histogram bin estimator. |
| 79 | |
| 80 | Another simple estimator with no normality assumption. It has better |
| 81 | performance for large data than Sturges, but tends to overestimate |
| 82 | the number of bins. The number of bins is proportional to the cube |
| 83 | root of data size (asymptotically optimal). The estimate depends |
| 84 | only on size of the data. |
| 85 | |
| 86 | Parameters |
| 87 | ---------- |
| 88 | x : array_like |
| 89 | Input data that is to be histogrammed, trimmed to range. May not |
| 90 | be empty. |
| 91 | |
| 92 | Returns |
| 93 | ------- |
| 94 | h : An estimate of the optimal bin width for the given data. |
| 95 | """ |
| 96 | del range # unused |
| 97 | return _ptp(x) / (2.0 * x.size ** (1.0 / 3)) |
| 98 | |
| 99 | |
| 100 | def _hist_bin_scott(x, range): |
nothing calls this directly
no test coverage detected
searching dependent graphs…