mulan.evaluation.measure
Class LabelBasedBipartitionMeasureBase

java.lang.Object
  extended by mulan.evaluation.measure.MeasureBase
      extended by mulan.evaluation.measure.BipartitionMeasureBase
          extended by mulan.evaluation.measure.LabelBasedBipartitionMeasureBase
All Implemented Interfaces:
Serializable, Measure
Direct Known Subclasses:
LabelBasedFMeasure, LabelBasedPrecision, LabelBasedRecall, LabelBasedSpecificity

public abstract class LabelBasedBipartitionMeasureBase
extends BipartitionMeasureBase

Base class for label-based bipartition measures

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

Field Summary
protected  double[] falseNegatives
          the number of false negative for each label
protected  double[] falsePositives
          the number of false positives for each label
protected  int numOfLabels
          the number of labels
protected  double[] trueNegatives
          the number of true negatives for each label
protected  double[] truePositives
          the number of true positives for each label
 
Constructor Summary
LabelBasedBipartitionMeasureBase(int aNumOfLabels)
          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).
 void updateBipartition(boolean[] bipartition, boolean[] truth)
          Updates the measure based on an example
 
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
 
Methods inherited from interface mulan.evaluation.measure.Measure
getIdealValue, getName, getValue
 

Field Detail

numOfLabels

protected int numOfLabels
the number of labels


falseNegatives

protected double[] falseNegatives
the number of false negative for each label


truePositives

protected double[] truePositives
the number of true positives for each label


falsePositives

protected double[] falsePositives
the number of false positives for each label


trueNegatives

protected double[] trueNegatives
the number of true negatives for each label

Constructor Detail

LabelBasedBipartitionMeasureBase

public LabelBasedBipartitionMeasureBase(int aNumOfLabels)
Creates a new instance of this class

Parameters:
aNumOfLabels - the number of labels
Method Detail

updateBipartition

public 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

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