mulan.evaluation.loss
Class HammingLoss
java.lang.Object
   mulan.evaluation.loss.BipartitionLossFunctionBase
mulan.evaluation.loss.BipartitionLossFunctionBase
       mulan.evaluation.loss.HammingLoss
mulan.evaluation.loss.HammingLoss
- All Implemented Interfaces: 
- Serializable, BipartitionLossFunction, MultiLabelLossFunction
- public class HammingLoss 
- extends BipartitionLossFunctionBase
Implementation of the hamming loss function. It is basically
 the symmetric difference between the predicted and ground truth labels
- Version:
- 2010.12.01
- Author:
- Grigorios Tsoumakas
- See Also:
- Serialized Form
 
| Method Summary | 
|  double | computeLoss(boolean[] bipartition,
            boolean[] groundTruth)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 | 
 
HammingLoss
public HammingLoss()
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[] groundTruth)
- Description copied from interface: BipartitionLossFunction
- Computes the bipartition loss function
 
- 
- Specified by:
- computeLossin interface- BipartitionLossFunction
- Specified by:
- computeLossin class- BipartitionLossFunctionBase
 
- 
- Parameters:
- bipartition- the biprtition of the learner for an example
- groundTruth- the ground truth of the example
- Returns:
- the value of the loss function