mulan.evaluation.measure
Class LabelBasedAveragePrecision

java.lang.Object
  extended by mulan.evaluation.measure.MeasureBase
      extended by mulan.evaluation.measure.ConfidenceMeasureBase
          extended by mulan.evaluation.measure.LabelBasedAveragePrecision
All Implemented Interfaces:
Serializable, Measure
Direct Known Subclasses:
MeanAverageInterpolatedPrecision, MeanAveragePrecision

public abstract class LabelBasedAveragePrecision
extends ConfidenceMeasureBase

Version:
2010.12.04
Author:
Eleftherios Spyromitros-Xioufis
See Also:
Serialized Form

Nested Class Summary
protected  class LabelBasedAveragePrecision.ConfidenceActual
          Class that stores a confidence and a ground truth for one label/example
 
Field Summary
protected  List<LabelBasedAveragePrecision.ConfidenceActual>[] confact
          collection that stores all predictions and ground truths
protected  int numOfLabels
          the number of labels
 
Constructor Summary
LabelBasedAveragePrecision(int numOfLabels)
          Creates a new instance of this class
 
Method Summary
 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 updateConfidence(double[] confidences, boolean[] truth)
          Updates the measure for a new example
 
Methods inherited from class mulan.evaluation.measure.ConfidenceMeasureBase
updateInternal
 
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, getValue
 

Field Detail

numOfLabels

protected int numOfLabels
the number of labels


confact

protected List<LabelBasedAveragePrecision.ConfidenceActual>[] confact
collection that stores all predictions and ground truths

Constructor Detail

LabelBasedAveragePrecision

public LabelBasedAveragePrecision(int numOfLabels)
Creates a new instance of this class

Parameters:
numOfLabels - the number of labels
Method Detail

updateConfidence

protected void updateConfidence(double[] confidences,
                                boolean[] truth)
Description copied from class: ConfidenceMeasureBase
Updates the measure for a new example

Specified by:
updateConfidence in class ConfidenceMeasureBase
Parameters:
confidences - the confidences output by the learner for the example
truth - the ground truth of the example

reset

public void reset()
Description copied from interface: Measure
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).