Struct ndarray_histogram::histogram::strategies::Auto
source · pub struct Auto<T> { /* private fields */ }
Expand description
Maximum of the Sturges
and FreedmanDiaconis
strategies. Provides good all around
performance.
A compromise to get a good value. For small datasets the Sturges
value will usually be
chosen, while larger datasets will usually default to FreedmanDiaconis
. Avoids the overly
conservative behaviour of FreedmanDiaconis
and Sturges
for small and large datasets
respectively.
Notes
This strategy requires the data
- not being empty
- not being constant
- having positive
IQR
Implementations§
Trait Implementations§
source§impl<T> BinsBuildingStrategy for Auto<T>where
T: Ord + Send + Clone + FromPrimitive + NumOps + Zero,
impl<T> BinsBuildingStrategy for Auto<T>where T: Ord + Send + Clone + FromPrimitive + NumOps + Zero,
source§fn from_array<S>(a: &ArrayBase<S, Ix1>) -> Result<Self, BinsBuildError>where
S: Data<Elem = Self::Elem>,
fn from_array<S>(a: &ArrayBase<S, Ix1>) -> Result<Self, BinsBuildError>where S: Data<Elem = Self::Elem>,
Returns Err(BinsBuildError::Strategy)
if IQR==0
.
Returns Err(BinsBuildError::EmptyInput)
if a.len()==0
.
Returns Ok(Self)
otherwise.