pub struct FreedmanDiaconis<T> { /* private fields */ }
Expand description

Robust (resilient to outliers) strategy that takes into account data variability and data size.

Let n be the number of observations.

bin_width = 2×IQR×n−1/3

The bin width is proportional to the interquartile range (IQR) and inversely proportional to cube root of n. It can be too conservative for small datasets, but it is quite good for large datasets.

The IQR is very robust to outliers.

Implementations

The bin width (or bin length) according to the fitted strategy.

Trait Implementations

Panics if IQR==0 or if a.len()==0.

Returns a Bins instance, built accordingly to the parameters inferred from observations in from_array. Read more
Returns the optimal number of bins, according to the parameters inferred from observations in from_array. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.