net.myrrix.common.stats
Class RunningStatistics

java.lang.Object
  extended by net.myrrix.common.stats.RunningStatistics
All Implemented Interfaces:
Serializable, RunningAverageAndMinMax, org.apache.mahout.cf.taste.impl.common.RunningAverage, org.apache.mahout.cf.taste.impl.common.RunningAverageAndStdDev

public final class RunningStatistics
extends Object
implements org.apache.mahout.cf.taste.impl.common.RunningAverageAndStdDev, RunningAverageAndMinMax, Serializable

Like implementations of RunningAverageAndStdDev but adds more statistics, like min and max.

Author:
Sean Owen
See Also:
Serialized Form

Constructor Summary
RunningStatistics()
           
 
Method Summary
 void addDatum(double v)
           
 void changeDatum(double v)
           
 double getAverage()
           
 int getCount()
           
 double getMax()
           
 double getMin()
           
 double getStandardDeviation()
           
 org.apache.mahout.cf.taste.impl.common.RunningAverageAndStdDev inverse()
           
 void removeDatum(double v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunningStatistics

public RunningStatistics()
Method Detail

getCount

public int getCount()
Specified by:
getCount in interface org.apache.mahout.cf.taste.impl.common.RunningAverage

getAverage

public double getAverage()
Specified by:
getAverage in interface org.apache.mahout.cf.taste.impl.common.RunningAverage

getStandardDeviation

public double getStandardDeviation()
Specified by:
getStandardDeviation in interface org.apache.mahout.cf.taste.impl.common.RunningAverageAndStdDev

getMin

public double getMin()
Specified by:
getMin in interface RunningAverageAndMinMax

getMax

public double getMax()
Specified by:
getMax in interface RunningAverageAndMinMax

addDatum

public void addDatum(double v)
Specified by:
addDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAverage

removeDatum

public void removeDatum(double v)
Specified by:
removeDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
Throws:
UnsupportedOperationException

changeDatum

public void changeDatum(double v)
Specified by:
changeDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
Throws:
UnsupportedOperationException

inverse

public org.apache.mahout.cf.taste.impl.common.RunningAverageAndStdDev inverse()
Specified by:
inverse in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
Specified by:
inverse in interface org.apache.mahout.cf.taste.impl.common.RunningAverageAndStdDev
Throws:
UnsupportedOperationException


Copyright © 2012. All Rights Reserved.