mulan.evaluation.measure
Class ExampleBasedBipartitionMeasureBase

java.lang.Object
  extended by mulan.evaluation.measure.MeasureBase
      extended by mulan.evaluation.measure.BipartitionMeasureBase
          extended by mulan.evaluation.measure.ExampleBasedBipartitionMeasureBase
All Implemented Interfaces:
Serializable, Measure
Direct Known Subclasses:
ExampleBasedAccuracy, ExampleBasedFMeasure, ExampleBasedPrecision, ExampleBasedRecall, ExampleBasedSpecificity, LossBasedBipartitionMeasureBase, SubsetAccuracy

public abstract class ExampleBasedBipartitionMeasureBase
extends BipartitionMeasureBase

Base class for example-based bipartition measures

Version:
2010.12.03
Author:
Grigorios Tsoumakas
See Also:
Serialized Form

Field Summary
protected  int count
          The number of validation examples processed
protected  double sum
          The current sum of the measure
 
Constructor Summary
ExampleBasedBipartitionMeasureBase()
           
 
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).
 
Methods inherited from class mulan.evaluation.measure.BipartitionMeasureBase
updateBipartition, 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
 

Field Detail

sum

protected double sum
The current sum of the measure


count

protected int count
The number of validation examples processed

Constructor Detail

ExampleBasedBipartitionMeasureBase

public ExampleBasedBipartitionMeasureBase()
Method Detail

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).


getValue

public double getValue()
Description copied from interface: Measure
Gets the value of a measure. The measure is incrementally cumulated for learner's prediction by each 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).

Returns:
the average measure value computed so far