mulan.evaluation.loss
Class RankingLoss
java.lang.Object
mulan.evaluation.loss.RankingLossFunctionBase
mulan.evaluation.loss.ErrorSetSize
mulan.evaluation.loss.RankingLoss
- All Implemented Interfaces:
- Serializable, MultiLabelLossFunction, RankingLossFunction
public class RankingLoss
- extends ErrorSetSize
Implementation of the "ranking loss" ranking loss function. It is basically
the size of the error set divided by all possible pairs of relevant and
irrelevant labels
- Version:
- 2010.11.05
- Author:
- Grigorios Tsoumakas
- See Also:
- Serialized Form
Method Summary |
double |
computeLoss(int[] ranking,
boolean[] groundTruth)
Computes the ranking loss function |
String |
getName()
Returns the name of the loss function |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RankingLoss
public RankingLoss()
getName
public String getName()
- Description copied from interface:
MultiLabelLossFunction
- Returns the name of the loss function
- Specified by:
getName
in interface MultiLabelLossFunction
- Overrides:
getName
in class ErrorSetSize
- Returns:
- the name of the loss function
computeLoss
public double computeLoss(int[] ranking,
boolean[] groundTruth)
- Description copied from interface:
RankingLossFunction
- Computes the ranking loss function
- Specified by:
computeLoss
in interface RankingLossFunction
- Overrides:
computeLoss
in class ErrorSetSize
- Parameters:
ranking
- the ranking of the learner for an examplegroundTruth
- the ground truth of the example
- Returns:
- the value of the loss function