Class Fallout

java.lang.Object
smile.validation.metric.Fallout
All Implemented Interfaces:
Serializable, ClassificationMetric

public class Fallout extends Object implements ClassificationMetric
Fall-out, false alarm rate, or false positive rate (FPR)
     FPR = FP / N = FP / (FP + TN)
 
Fall-out is actually Type I error and closely related to specificity (1 - specificity).
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Fallout
    Default instance.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    of(int[] truth, int[] prediction)
    Calculates the false alarm rate.
    double
    score(int[] truth, int[] prediction)
    Returns a score to measure the quality of classification.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • instance

      public static final Fallout instance
      Default instance.
  • Constructor Details

    • Fallout

      public Fallout()
  • Method Details

    • score

      public double score(int[] truth, int[] prediction)
      Description copied from interface: ClassificationMetric
      Returns a score to measure the quality of classification.
      Specified by:
      score in interface ClassificationMetric
      Parameters:
      truth - the true class labels.
      prediction - the predicted class labels.
      Returns:
      the metric.
    • of

      public static double of(int[] truth, int[] prediction)
      Calculates the false alarm rate.
      Parameters:
      truth - the ground truth.
      prediction - the prediction.
      Returns:
      the metric.
    • toString

      public String toString()
      Overrides:
      toString in class Object