mulan.evaluation.loss
Class RankingLossFunctionBase
java.lang.Object
mulan.evaluation.loss.RankingLossFunctionBase
- All Implemented Interfaces:
- Serializable, MultiLabelLossFunction, RankingLossFunction
- Direct Known Subclasses:
- ErrorSetSize, IsError, OneError, OneMinusAveragePrecision
public abstract class RankingLossFunctionBase
- extends Object
- implements RankingLossFunction, Serializable
Base class for ranking loss functions
- Version:
- 2010.11.10
- Author:
- GrigoriosTsoumakas
- See Also:
- Serialized Form
Method Summary |
abstract double |
computeLoss(int[] ranking,
boolean[] groundTruth)
Computes the ranking loss function |
double |
computeLoss(MultiLabelOutput prediction,
boolean[] groundTruth)
Computes the loss function |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RankingLossFunctionBase
public RankingLossFunctionBase()
computeLoss
public final double computeLoss(MultiLabelOutput prediction,
boolean[] groundTruth)
- Description copied from interface:
MultiLabelLossFunction
- Computes the loss function
- Specified by:
computeLoss
in interface MultiLabelLossFunction
- Parameters:
prediction
- the prediction of the learner for an examplegroundTruth
- the ground truth of the example
- Returns:
- the value of the loss function
computeLoss
public abstract double computeLoss(int[] ranking,
boolean[] groundTruth)
- Description copied from interface:
RankingLossFunction
- Computes the ranking loss function
- Specified by:
computeLoss
in interface RankingLossFunction
- Parameters:
ranking
- the ranking of the learner for an examplegroundTruth
- the ground truth of the example
- Returns:
- the value of the loss function