mulan.evaluation.measure
Class MacroSpecificity

java.lang.Object
  extended by mulan.evaluation.measure.MeasureBase
      extended by mulan.evaluation.measure.BipartitionMeasureBase
          extended by mulan.evaluation.measure.LabelBasedBipartitionMeasureBase
              extended by mulan.evaluation.measure.LabelBasedSpecificity
                  extended by mulan.evaluation.measure.MacroSpecificity
All Implemented Interfaces:
Serializable, MacroAverageMeasure, Measure

public class MacroSpecificity
extends LabelBasedSpecificity
implements MacroAverageMeasure

Implementation of the macro-averaged recall measure.

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

Field Summary
 
Fields inherited from class mulan.evaluation.measure.LabelBasedBipartitionMeasureBase
falseNegatives, falsePositives, numOfLabels, trueNegatives, truePositives
 
Constructor Summary
MacroSpecificity(int numOfLabels)
          Constructs a new object with given number of labels and strictness
 
Method Summary
 String getName()
          Gets the name of a measure.
 double getValue()
          Gets the value of a measure.
 double getValue(int labelIndex)
          Returns the specificity for a label
 
Methods inherited from class mulan.evaluation.measure.LabelBasedSpecificity
getIdealValue
 
Methods inherited from class mulan.evaluation.measure.LabelBasedBipartitionMeasureBase
reset, updateBipartition
 
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

MacroSpecificity

public MacroSpecificity(int numOfLabels)
Constructs a new object with given number of labels and strictness

Parameters:
numOfLabels - the number of labels
Method Detail

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

Specified by:
getValue in interface Measure
Returns:
the average measure value computed so far

getName

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

Specified by:
getName in interface Measure
Returns:
the name of a measure.

getValue

public double getValue(int labelIndex)
Returns the specificity for a label

Specified by:
getValue in interface MacroAverageMeasure
Parameters:
labelIndex - the index of a label (starting from 0)
Returns:
the specificity for the given label