Click or drag to resize
Accord.NET (logo)

BinAdjustmentRule Enumeration

Optimum histogram bin size adjustment rule.

Namespace:  Accord.Statistics.Visualizations
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public enum BinAdjustmentRule
Members
  Member nameValueDescription
None0 Does not attempts to automatically calculate an optimum bin width and preserves the current histogram organization.
Scott1 Calculates the optimum bin width as 3.49σN, where σ is the sample standard deviation and N is the number of samples.
Sturges2 Calculates the optimum bin width as ceiling( log2(N) + 1 )m where N is the number of samples. The rule implicitly bases the bin sizes on the range of the data, and can perform poorly if n < 30.
SquareRoot3 Calculates the optimum bin width as the square root of the number of samples. This is the same rule used by Microsoft (c) Excel and many others.
See Also