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
 
- Alphabetic
 - By Inheritance
 
- StatCounter
 - Serializable
 - Serializable
 - AnyRef
 - Any
 
- Hide All
 - Show All
 
- Public
 - All
 
Instance Constructors
- 
      
      
      
        
      
    
      
        
        new
      
      
        StatCounter()
      
      
      
Initialize the StatCounter with no values.
 - 
      
      
      
        
      
    
      
        
        new
      
      
        StatCounter(values: TraversableOnce[Double])
      
      
      
Initialize the StatCounter with the given values.
 
Value Members
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        !=(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ##(): Int
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ==(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        asInstanceOf[T0]: T0
      
      
      
- Definition Classes
 - Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      
- Attributes
 - protected[lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... ) @native()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        copy(): StatCounter
      
      
      
Clone this StatCounter
 -  def count: Long
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        finalize(): Unit
      
      
      
- Attributes
 - protected[lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws( classOf[java.lang.Throwable] )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        getClass(): Class[_]
      
      
      
- Definition Classes
 - AnyRef → Any
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        hashCode(): Int
      
      
      
- Definition Classes
 - AnyRef → Any
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        isInstanceOf[T0]: Boolean
      
      
      
- Definition Classes
 - Any
 
 -  def max: Double
 -  def mean: Double
 - 
      
      
      
        
      
    
      
        
        def
      
      
        merge(other: StatCounter): StatCounter
      
      
      
Merge another StatCounter into this one, adding up the internal statistics.
 - 
      
      
      
        
      
    
      
        
        def
      
      
        merge(values: TraversableOnce[Double]): StatCounter
      
      
      
Add multiple values into this StatCounter, updating the internal statistics.
 - 
      
      
      
        
      
    
      
        
        def
      
      
        merge(value: Double): StatCounter
      
      
      
Add a value into this StatCounter, updating the internal statistics.
 -  def min: Double
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ne(arg0: AnyRef): Boolean
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        notify(): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        notifyAll(): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        popStdev: Double
      
      
      
Return the population standard deviation of the values.
Return the population standard deviation of the values.
- Annotations
 - @Since( "2.1.0" )
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        popVariance: Double
      
      
      
Return the population variance of the values.
Return the population variance of the values.
- Annotations
 - @Since( "2.1.0" )
 
 - 
      
      
      
        
      
    
      
        
        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.
 - 
      
      
      
        
      
    
      
        
        def
      
      
        sampleVariance: Double
      
      
      
Return the sample variance, which corrects for bias in estimating the variance by dividing by N-1 instead of N.
 - 
      
      
      
        
      
    
      
        
        def
      
      
        stdev: Double
      
      
      
Return the population standard deviation of the values.
 -  def sum: Double
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      
- Definition Classes
 - StatCounter → AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        variance: Double
      
      
      
Return the population variance of the values.
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long, arg1: Int): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... ) @native()