Interface ClassificationMetric

All Superinterfaces:
Serializable, ToDoubleBiFunction<int[],int[]>
All Known Implementing Classes:
Accuracy, Error, Fallout, FDR, FScore, MatthewsCorrelation, Precision, Recall, Sensitivity, Specificity

public interface ClassificationMetric extends ToDoubleBiFunction<int[],int[]>, Serializable
An abstract interface to measure the classification performance.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    applyAsDouble(int[] truth, int[] prediction)
     
    double
    score(int[] truth, int[] prediction)
    Returns a score to measure the quality of classification.
  • Method Details

    • score

      double score(int[] truth, int[] prediction)
      Returns a score to measure the quality of classification.
      Parameters:
      truth - the true class labels.
      prediction - the predicted class labels.
      Returns:
      the metric.
    • applyAsDouble

      default double applyAsDouble(int[] truth, int[] prediction)
      Specified by:
      applyAsDouble in interface ToDoubleBiFunction<int[],int[]>