Class BinaryLossFunction

  • All Implemented Interfaces:
    LossFunction

    public class BinaryLossFunction
    extends java.lang.Object
    implements LossFunction
    A loss function that considers the value 100% correct if in a given range, 0% otherwise.
    • Method Summary

      Modifier and Type Method Description
      double evaluate​(double error)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BinaryLossFunction

        public BinaryLossFunction​(double threshold)
        Construct a BinaryLossFunction object from the specified threshold (range).
        Parameters:
        threshold - the 'error' tolerated to consider a 100% accuracy
      • BinaryLossFunction

        public BinaryLossFunction()
        Construct a BinaryLossFunction object with ScoreDistribution.EPSILON threshold.
    • Method Detail

      • evaluate

        public double evaluate​(double error)
        Specified by:
        evaluate in interface LossFunction