mulan.evaluation.loss
Class HierarchicalLoss
java.lang.Object
mulan.evaluation.loss.BipartitionLossFunctionBase
mulan.evaluation.loss.HierarchicalLoss
- All Implemented Interfaces:
- Serializable, BipartitionLossFunction, MultiLabelLossFunction
public class HierarchicalLoss
- extends BipartitionLossFunctionBase
Implementation of the hierarchical loss function.
- Version:
- 2010.12.10
- Author:
- George Saridis, Grigorios Tsoumakas
- See Also:
- Serialized Form
Method Summary |
double |
computeLoss(boolean[] bipartition,
boolean[] truth)
Computes the bipartition 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 |
HierarchicalLoss
public HierarchicalLoss(MultiLabelInstances data)
- Creates a new instance of this class
- Parameters:
data
- the training data
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(boolean[] bipartition,
boolean[] truth)
- Description copied from interface:
BipartitionLossFunction
- Computes the bipartition loss function
- Specified by:
computeLoss
in interface BipartitionLossFunction
- Specified by:
computeLoss
in class BipartitionLossFunctionBase
- Parameters:
bipartition
- the biprtition of the learner for an exampletruth
- the ground truth of the example
- Returns:
- the value of the loss function