Class DescriptiveStats

java.lang.Object
org.tribuo.evaluation.DescriptiveStats

public final class DescriptiveStats extends Object
Descriptive statistics calculated across a list of doubles.
  • Constructor Details

    • DescriptiveStats

      public DescriptiveStats()
      Create an empty DescriptiveStats.
    • DescriptiveStats

      public DescriptiveStats(List<Double> values)
      Create a DescriptiveStats initialized with the supplied values.
      Parameters:
      values - The initial values.
  • Method Details

    • getMean

      public double getMean()
      Calculates the mean of the values.
      Returns:
      The mean.
    • getVariance

      public double getVariance()
      Calculates the sample variance of the values.
      Returns:
      The sample variance.
    • getStandardDeviation

      public double getStandardDeviation()
      Calculates the standard deviation of the values.
      Returns:
      The standard deviation.
    • getMax

      public double getMax()
      Calculates the max of the values.
      Returns:
      The maximum value.
    • getMin

      public double getMin()
      Calculates the min of the values.
      Returns:
      The minimum value.
    • getN

      public long getN()
      Returns the number of values.
      Returns:
      The number of values.
    • values

      public List<Double> values()
      Returns a copy of the values.
      Returns:
      A copy of the values.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object