org.apache.mahout.cf.taste.impl.common
Class FixedRunningAverageAndStdDev
java.lang.Object
org.apache.mahout.cf.taste.impl.common.FixedRunningAverage
org.apache.mahout.cf.taste.impl.common.FixedRunningAverageAndStdDev
- All Implemented Interfaces:
- Serializable, RunningAverage, RunningAverageAndStdDev
public final class FixedRunningAverageAndStdDev
- extends FixedRunningAverage
- implements RunningAverageAndStdDev
A simple class that represents a fixed value of an average, count and standard deviation. This is useful
when an API needs to return RunningAverageAndStdDev
but is not in a position to accept
updates to it.
- See Also:
- Serialized Form
FixedRunningAverageAndStdDev
public FixedRunningAverageAndStdDev(double average,
double stdDev,
int count)
inverse
public RunningAverageAndStdDev inverse()
- Specified by:
inverse
in interface RunningAverage
- Specified by:
inverse
in interface RunningAverageAndStdDev
- Overrides:
inverse
in class FixedRunningAverage
- Returns:
- a (possibly immutable) object whose average is the negative of this object's
toString
public String toString()
- Overrides:
toString
in class FixedRunningAverage
getStandardDeviation
public double getStandardDeviation()
- Specified by:
getStandardDeviation
in interface RunningAverageAndStdDev
- Returns:
- standard deviation of data
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.