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

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

Trait Implementations

Returns Err(BinsBuildError::Strategy) if IQR==0. Returns Err(BinsBuildError::EmptyInput) if a.len()==0. Returns Ok(Self) otherwise.

Returns a Bins instance, according to parameters inferred from observations. Read more

Returns the optimal number of bins, according to parameters inferred from observations.

Formats the value using the given formatter. 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.