Maths.Histogram

References
public readonly struct Maths.Histogram
A complete historgram for a data set.

Properties

BucketCount

#
public int BucketCount { get; }
Gets the number of buckets in this histogram.

BucketWidth

#
public double BucketWidth { get; }
Gets the width of all buckets.

Deviation

#
public double Deviation { get; }
Gets the standard deviation of the value collection.

Highest

#
public int Highest { get; }
Gets the count of the fullest bucket.

LowerLimit

#
public double LowerLimit { get; }
Gets the lower limit of this histogram. This may differ from the Minimum if the histogram is forced to align with another one.

Lowest

#
public int Lowest { get; }
Gets the count of the emptiest bucket.

Maximum

#
public double Maximum { get; }
Gets the value of the largest (or most positive) number in this histogram.

Mean

#
public double Mean { get; }
Gets the mean of the value collection.

Median

#
public double Median { get; }
Gets the median of the value collection.

Minimum

#
public double Minimum { get; }
Gets the value of the smallest (or most negative) number in this histogram.

Q2

#
public double Q2 { get; }
Gets the transition between the first and second quartiles.

Q3

#
public double Q3 { get; }
Gets the transition between the second and third quartiles.

UpperLimit

#
public double UpperLimit { get; }
Gets the upper limit of this histogram. This may differ from the Maximum if the histogram is forced to align with another one.

Indexers

this[]

#
public Maths.HistogramBucket this[int index] { get; }
Gets the bucket at the given index.
index (int)

Methods

BucketsAccordingToSturges

#
public static int BucketsAccordingToSturges(double lower, double upper, long count)
Compute the ideal number of buckets according to Herbert A. Sturges in his paper 'The Choice Of A Class Interval' in doi:10.1080/01621459.1926.10502161
lower (double)Lower bound of distribution.
upper (double)Upper bound of distribution.
count (long)Number of samples in distribution
Ideal number of buckets on the distribution interval.

Create

#
public static Maths.Histogram Create(IEnumerable<double> data, double lower, double upper, HowManyBuckets howManyBuckets)
Compute the histogram for a data set.
data (IEnumerable<double>)Data set.
lower (double)Lower bound of first bucket.
upper (double)Upper bound of last bucket.
howManyBuckets (Maths.HowManyBuckets)Number of buckets.

Create

#
public static Maths.Histogram Create(IEnumerable<double> data, HowManyBuckets howManyBuckets)
Compute the histogram for a data set with automatic bounds. This method enumerates the data set twice.
data (IEnumerable<double>)Data set.
howManyBuckets (Maths.HowManyBuckets)Number of buckets.

Create

#
public static Maths.Histogram Create(IEnumerable<double> data)
Compute the standard histogram for a data set.
data (IEnumerable<double>)Data set.

Create

#
public static Maths.Histogram Create(IEnumerable<int> data)
Create the standard histogram for integer data.
data (IEnumerable<int>)

CreateMultiple

#
public static Maths.Histogram[] CreateMultiple(IEnumerable<double>[] data, double lower, double upper, HowManyBuckets howManyBuckets)
Create multiple aligned histograms.
data (IEnumerable<double>[])Multiple data sets.
lower (double)Lower bound of first bucket.
upper (double)Upper bound of last bucket.
howManyBuckets (Maths.HowManyBuckets)Number of buckets.

CreateMultiple

#
public static Maths.Histogram[] CreateMultiple(IEnumerable<double>[] data, HowManyBuckets howManyBuckets)
Create multiple aligned histograms.
data (IEnumerable<double>[])Multiple data sets.
howManyBuckets (Maths.HowManyBuckets)Number of buckets.

CreateMultiple

#
public static Maths.Histogram[] CreateMultiple(IEnumerable<double>[] data)
Create multiple aligned histograms.
data (IEnumerable<double>[])Multiple data sets.

RoundBucketsToNiceNumber

#
public static int RoundBucketsToNiceNumber(int count)
Round a histogram bucket count to a 'nice' number.
count (int)