mulan.evaluation.loss
Class ErrorSetSize
java.lang.Object
mulan.evaluation.loss.RankingLossFunctionBase
mulan.evaluation.loss.ErrorSetSize
- All Implemented Interfaces:
- Serializable, MultiLabelLossFunction, RankingLossFunction
- Direct Known Subclasses:
- RankingLoss
public class ErrorSetSize
- extends RankingLossFunctionBase
Implementation of the ErrorSetSize loss function, which computes the size of
the error set. The error set is composed of all possible label pairs,
where one is relevant and the other is not, and which satisfy the condition
that the relevant label is ranked lower than the irrelevant one.
- Version:
- 2010.11.10
- 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 |
ErrorSetSize
public ErrorSetSize()
getName
public String getName()
- Description copied from interface:
MultiLabelLossFunction
- Returns the name of the loss function
- 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
- Specified by:
computeLoss
in class RankingLossFunctionBase
- Parameters:
ranking
- the ranking of the learner for an examplegroundTruth
- the ground truth of the example
- Returns:
- the value of the loss function