|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mulan.evaluation.measure.MeasureBase mulan.evaluation.measure.RankingMeasureBase
public abstract class RankingMeasureBase
Field Summary | |
---|---|
protected int |
count
The number of validation examples processed |
protected double |
sum
The current sum of the measure |
Constructor Summary | |
---|---|
RankingMeasureBase()
|
Method Summary | |
---|---|
double |
getValue()
Gets the value of a measure. |
void |
reset()
Resets the cumulated measure value, so the process of computation can be started from beginning (e.g. for a new series of outputs from learning task). |
protected void |
updateInternal(MultiLabelOutput prediction,
boolean[] truth)
Updates the measure based on an example |
protected abstract void |
updateRanking(int[] ranking,
boolean[] truth)
Updates the measure based on an example |
Methods inherited from class mulan.evaluation.measure.MeasureBase |
---|
makeCopy, toString, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface mulan.evaluation.measure.Measure |
---|
getIdealValue, getName |
Field Detail |
---|
protected double sum
protected int count
Constructor Detail |
---|
public RankingMeasureBase()
Method Detail |
---|
public void reset()
Measure
public double getValue()
Measure
Measure.update(MultiLabelOutput, boolean[])
call. The value
returned by the method, returns sum of all update calls divided by the number
of calls (average of all measures for all predictions).
protected void updateInternal(MultiLabelOutput prediction, boolean[] truth)
MeasureBase
updateInternal
in class MeasureBase
prediction
- the output of the algorithm for the exampletruth
- the ground truth of the exampleprotected abstract void updateRanking(int[] ranking, boolean[] truth)
ranking
- the predicted rankingtruth
- the ground truth
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |