mulan.evaluation.measure
Class AveragePrecision
java.lang.Object
mulan.evaluation.measure.MeasureBase
mulan.evaluation.measure.RankingMeasureBase
mulan.evaluation.measure.AveragePrecision
- All Implemented Interfaces:
- Serializable, Measure
public class AveragePrecision
- extends RankingMeasureBase
Implementation of the average precision measure. It evaluates the average
fraction of labels ranked above a particular relevant label, that are
actually relevant.
- Version:
- 2010.11.05
- Author:
- Jozef Vilcek, Grigorios Tsoumakas
- See Also:
- Serialized Form
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[] trueLabels)
Updates the measure based on an example |
AveragePrecision
public AveragePrecision()
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
updateRanking
protected void updateRanking(int[] ranking,
boolean[] trueLabels)
- Description copied from class:
RankingMeasureBase
- Updates the measure based on an example
- Specified by:
updateRanking
in class RankingMeasureBase
- Parameters:
ranking
- the predicted rankingtrueLabels
- the ground truth