public final class WeightedRunningAverage extends Object implements org.apache.mahout.cf.taste.impl.common.RunningAverage, Serializable
Ported from Mahout WeightedRunningAverage but uses int weights.
| Constructor and Description |
|---|
WeightedRunningAverage() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDatum(double datum) |
void |
addDatum(double datum,
int weight) |
void |
changeDatum(double delta) |
void |
changeDatum(double delta,
int weight) |
double |
getAverage() |
int |
getCount() |
double |
getTotalWeight() |
org.apache.mahout.cf.taste.impl.common.RunningAverage |
inverse() |
void |
removeDatum(double datum) |
void |
removeDatum(double datum,
int weight) |
String |
toString() |
public void addDatum(double datum)
addDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAveragepublic void addDatum(double datum,
int weight)
public void removeDatum(double datum)
removeDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAveragepublic void removeDatum(double datum,
int weight)
public void changeDatum(double delta)
changeDatum in interface org.apache.mahout.cf.taste.impl.common.RunningAveragepublic void changeDatum(double delta,
int weight)
public double getTotalWeight()
public int getCount()
getCount in interface org.apache.mahout.cf.taste.impl.common.RunningAveragegetTotalWeight()public double getAverage()
getAverage in interface org.apache.mahout.cf.taste.impl.common.RunningAveragepublic org.apache.mahout.cf.taste.impl.common.RunningAverage inverse()
inverse in interface org.apache.mahout.cf.taste.impl.common.RunningAverageUnsupportedOperationExceptionCopyright © 2012-2013 Myrrix Ltd. All Rights Reserved.