net.myrrix.common.stats
Class WeightedRunningAverage
java.lang.Object
net.myrrix.common.stats.WeightedRunningAverage
- All Implemented Interfaces:
- Serializable, org.apache.mahout.cf.taste.impl.common.RunningAverage
public final class WeightedRunningAverage
- extends Object
- implements org.apache.mahout.cf.taste.impl.common.RunningAverage, Serializable
Ported from Mahout WeightedRunningAverage but uses int weights.
- Author:
- Mahout
- See Also:
- Serialized Form
WeightedRunningAverage
public WeightedRunningAverage()
addDatum
public void addDatum(double datum)
- Specified by:
addDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
addDatum
public void addDatum(double datum,
int weight)
removeDatum
public void removeDatum(double datum)
- Specified by:
removeDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
removeDatum
public void removeDatum(double datum,
int weight)
changeDatum
public void changeDatum(double delta)
- Specified by:
changeDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
changeDatum
public void changeDatum(double delta,
int weight)
getTotalWeight
public double getTotalWeight()
getCount
public int getCount()
- Specified by:
getCount in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
- Returns:
getTotalWeight()
getAverage
public double getAverage()
- Specified by:
getAverage in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
inverse
public org.apache.mahout.cf.taste.impl.common.RunningAverage inverse()
- Specified by:
inverse in interface org.apache.mahout.cf.taste.impl.common.RunningAverage
- Throws:
UnsupportedOperationException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012. All Rights Reserved.