mulan.evaluation.loss
Class BipartitionLossFunctionBase
java.lang.Object
mulan.evaluation.loss.BipartitionLossFunctionBase
- All Implemented Interfaces:
- Serializable, BipartitionLossFunction, MultiLabelLossFunction
- Direct Known Subclasses:
- HammingLoss, HierarchicalLoss
public abstract class BipartitionLossFunctionBase
- extends Object
- implements BipartitionLossFunction, Serializable
Base class for bipartition loss functions
- Version:
- 2010.11.10
- Author:
- GrigoriosTsoumakas
- See Also:
- Serialized Form
Method Summary |
abstract double |
computeLoss(boolean[] bipartition,
boolean[] groundTruth)
Computes the bipartition 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 |
BipartitionLossFunctionBase
public BipartitionLossFunctionBase()
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(boolean[] bipartition,
boolean[] groundTruth)
- Description copied from interface:
BipartitionLossFunction
- Computes the bipartition loss function
- Specified by:
computeLoss
in interface BipartitionLossFunction
- Parameters:
bipartition
- the biprtition of the learner for an examplegroundTruth
- the ground truth of the example
- Returns:
- the value of the loss function