Module ndarray_stats::histogram::strategies [−][src]
Strategies to build Bins
s and Grid
s (using GridBuilder
) inferring
optimal parameters directly from data.
The docs for each strategy have been taken almost verbatim from NumPy
.
Each strategy specifies how to compute the optimal number of Bins
or
the optimal bin width.
For those strategies that prescribe the optimal number
of Bins
we then compute the optimal bin width with
bin_width = (max - min)/n
All our bins are left-inclusive and right-exclusive: we make sure to add an extra bin
if it is necessary to include the maximum value of the array that has been passed as argument
to the from_array
method.
Structs
Auto | Maximum of the |
FreedmanDiaconis | Robust (resilient to outliers) strategy that takes into account data variability and data size. |
Rice | A strategy that does not take variability into account, only data size. Commonly overestimates number of bins required. |
Sqrt | Square root (of data size) strategy, used by Excel and other programs for its speed and simplicity. |
Sturges | R’s default strategy, only accounts for data size. Only optimal for gaussian data and underestimates number of bins for large non-gaussian datasets. |
Traits
BinsBuildingStrategy | A trait implemented by all strategies to build |