public interface Metric
Interface used to be able to pass evaluation metrics as parameters of other methods. This can be used, for example, to create a macro-averaged method which receives metrics such as precision or recall.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    compute(Map<String,Double> confusionMatrix)
    Computes the value of the evaluation metric given a Map containing a confusion matrix.
  • Method Details

    • compute

      double compute(Map<String,Double> confusionMatrix)
      Computes the value of the evaluation metric given a Map containing a confusion matrix. The Map should contain four keys "tp" (true positive), "fp" (false positive), "tn" (true negative) and "fn" (false negative).
      Parameters:
      confusionMatrix - a Map containing a confusion matrix
      Returns:
      result of the evaluation metric.