mulan.evaluation.measure
Class LossBasedRankingMeasureBase

java.lang.Object
  extended by mulan.evaluation.measure.MeasureBase
      extended by mulan.evaluation.measure.RankingMeasureBase
          extended by mulan.evaluation.measure.LossBasedRankingMeasureBase
All Implemented Interfaces:
Serializable, Measure
Direct Known Subclasses:
ErrorSetSize, IsError, OneError, RankingLoss

public abstract class LossBasedRankingMeasureBase
extends RankingMeasureBase

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

Field Summary
 
Fields inherited from class mulan.evaluation.measure.RankingMeasureBase
count, sum
 
Constructor Summary
LossBasedRankingMeasureBase(RankingLossFunction aLoss)
          Creates a loss-based ranking measure
 
Method Summary
 double getIdealValue()
          Gets an 'ideal' value of a measure.
 String getName()
          Gets the name of a measure.
protected  void updateRanking(int[] ranking, boolean[] truth)
          Updates the measure based on an example
 
Methods inherited from class mulan.evaluation.measure.RankingMeasureBase
getValue, reset, 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

LossBasedRankingMeasureBase

public LossBasedRankingMeasureBase(RankingLossFunction aLoss)
Creates a loss-based ranking measure

Parameters:
aLoss - a ranking loss function
Method Detail

updateRanking

protected void updateRanking(int[] ranking,
                             boolean[] truth)
Description copied from class: RankingMeasureBase
Updates the measure based on an example

Specified by:
updateRanking in class RankingMeasureBase
Parameters:
ranking - the predicted ranking
truth - the ground truth

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