mulan.evaluation.measure
Class ExampleBasedAccuracy

java.lang.Object
  extended by mulan.evaluation.measure.MeasureBase
      extended by mulan.evaluation.measure.BipartitionMeasureBase
          extended by mulan.evaluation.measure.ExampleBasedBipartitionMeasureBase
              extended by mulan.evaluation.measure.ExampleBasedAccuracy
All Implemented Interfaces:
Serializable, Measure

public class ExampleBasedAccuracy
extends ExampleBasedBipartitionMeasureBase

Implementation of the example-based accuracy measure.

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

Field Summary
 
Fields inherited from class mulan.evaluation.measure.ExampleBasedBipartitionMeasureBase
count, sum
 
Constructor Summary
ExampleBasedAccuracy()
          Constructs a new object
ExampleBasedAccuracy(double aForgivenessRate)
          Constructs a new object
 
Method Summary
 double getIdealValue()
          Gets an 'ideal' value of a measure.
 String getName()
          Gets the name of a measure.
protected  void updateBipartition(boolean[] bipartition, boolean[] truth)
          Updates the measure based on an example
 
Methods inherited from class mulan.evaluation.measure.ExampleBasedBipartitionMeasureBase
getValue, reset
 
Methods inherited from class mulan.evaluation.measure.BipartitionMeasureBase
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
 

Constructor Detail

ExampleBasedAccuracy

public ExampleBasedAccuracy()
Constructs a new object


ExampleBasedAccuracy

public ExampleBasedAccuracy(double aForgivenessRate)
Constructs a new object

Parameters:
aForgivenessRate - the forgiveness rate
Method Detail

getName

public String getName()
Description copied from interface: Measure
Gets the name of a measure.

Returns:
the name of a measure.

getIdealValue

public double getIdealValue()
Description copied from interface: Measure
Gets an 'ideal' value of a measure. The 'ideal' means, that the value represents the best achievable performance of a learner for an prediction of a multi-label task and associated true labels.

Returns:
the ideal value

updateBipartition

protected void updateBipartition(boolean[] bipartition,
                                 boolean[] truth)
Description copied from class: BipartitionMeasureBase
Updates the measure based on an example

Specified by:
updateBipartition in class BipartitionMeasureBase
Parameters:
bipartition - the predicted bipartition
truth - the ground truth