Packages

class StatCounter extends Serializable

A class for tracking the statistics of a set of numbers (count, mean and variance) in a numerically robust way. Includes support for merging two StatCounters. Based on Welford and Chan's algorithms for running variance.

Source
StatCounter.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StatCounter
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StatCounter()

    Initialize the StatCounter with no values.

  2. new StatCounter(values: TraversableOnce[Double])

    Initialize the StatCounter with the given values.

Value Members

  1. def copy(): StatCounter

    Clone this StatCounter

  2. def count: Long
  3. def max: Double
  4. def mean: Double
  5. def merge(other: StatCounter): StatCounter

    Merge another StatCounter into this one, adding up the internal statistics.

  6. def merge(values: TraversableOnce[Double]): StatCounter

    Add multiple values into this StatCounter, updating the internal statistics.

  7. def merge(value: Double): StatCounter

    Add a value into this StatCounter, updating the internal statistics.

  8. def min: Double
  9. def popStdev: Double

    Return the population standard deviation of the values.

    Return the population standard deviation of the values.

    Annotations
    @Since( "2.1.0" )
  10. def popVariance: Double

    Return the population variance of the values.

    Return the population variance of the values.

    Annotations
    @Since( "2.1.0" )
  11. def sampleStdev: Double

    Return the sample standard deviation of the values, which corrects for bias in estimating the variance by dividing by N-1 instead of N.

  12. def sampleVariance: Double

    Return the sample variance, which corrects for bias in estimating the variance by dividing by N-1 instead of N.

  13. def stdev: Double

    Return the population standard deviation of the values.

  14. def sum: Double
  15. def toString(): String
    Definition Classes
    StatCounter → AnyRef → Any
  16. def variance: Double

    Return the population variance of the values.