Class PrecisionAsLoss

  • All Implemented Interfaces:
    IMeasure<java.lang.Double,​java.lang.Double>

    public class PrecisionAsLoss
    extends java.lang.Object
    implements IMeasure<java.lang.Double,​java.lang.Double>
    • Constructor Summary

      Constructors 
      Constructor Description
      PrecisionAsLoss​(int positiveClass)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double calculateAvgMeasure​(java.util.List<java.lang.Double> actual, java.util.List<java.lang.Double> expected)
      Computes the measure for lists of input actual and the expected outcome expected and aggregates the measured values with the mean, as this is the most frequently used aggregate function.
      java.lang.Double calculateMeasure​(java.lang.Double actual, java.lang.Double expected)
      Computes the measure for a measured input actual and the expected outcome expected.
      java.util.List<java.lang.Double> calculateMeasure​(java.util.List<java.lang.Double> actual, java.util.List<java.lang.Double> expected)
      Computes the measure for a lists of input actual and the expected outcome expected.
      java.lang.Double calculateMeasure​(java.util.List<java.lang.Double> actual, java.util.List<java.lang.Double> expected, ai.libs.jaicore.basic.aggregate.IAggregateFunction<java.lang.Double> aggregateFunction)
      Computes the measure for lists of input actual and the expected outcome expected and aggregates the measured values with the given aggregation.
      • Methods inherited from class java.lang.Object

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

      • PrecisionAsLoss

        public PrecisionAsLoss​(int positiveClass)
    • Method Detail

      • calculateMeasure

        public java.lang.Double calculateMeasure​(java.lang.Double actual,
                                                 java.lang.Double expected)
        Description copied from interface: IMeasure
        Computes the measure for a measured input actual and the expected outcome expected.
        Specified by:
        calculateMeasure in interface IMeasure<java.lang.Double,​java.lang.Double>
        Parameters:
        actual - The actually available values.
        expected - The expected values to compare the actual values with.
        Returns:
        The return value of the measure.
      • calculateMeasure

        public java.util.List<java.lang.Double> calculateMeasure​(java.util.List<java.lang.Double> actual,
                                                                 java.util.List<java.lang.Double> expected)
        Description copied from interface: IMeasure
        Computes the measure for a lists of input actual and the expected outcome expected.
        Specified by:
        calculateMeasure in interface IMeasure<java.lang.Double,​java.lang.Double>
        Parameters:
        actual - The list of actually available values.
        expected - The list of expected values to compare the actual values with.
        Returns:
        The list of return values of the measure.
      • calculateMeasure

        public java.lang.Double calculateMeasure​(java.util.List<java.lang.Double> actual,
                                                 java.util.List<java.lang.Double> expected,
                                                 ai.libs.jaicore.basic.aggregate.IAggregateFunction<java.lang.Double> aggregateFunction)
        Description copied from interface: IMeasure
        Computes the measure for lists of input actual and the expected outcome expected and aggregates the measured values with the given aggregation.
        Specified by:
        calculateMeasure in interface IMeasure<java.lang.Double,​java.lang.Double>
        Parameters:
        actual - The list of actually available values.
        expected - The list of expected values to compare the actual values with.
        aggregateFunction - The aggregate function to be used to aggregate all the measurements.
        Returns:
        The aggregated return value of the measure.
      • calculateAvgMeasure

        public java.lang.Double calculateAvgMeasure​(java.util.List<java.lang.Double> actual,
                                                    java.util.List<java.lang.Double> expected)
        Description copied from interface: IMeasure
        Computes the measure for lists of input actual and the expected outcome expected and aggregates the measured values with the mean, as this is the most frequently used aggregate function.
        Specified by:
        calculateAvgMeasure in interface IMeasure<java.lang.Double,​java.lang.Double>
        Parameters:
        actual - The list of actually available values.
        expected - The list of expected values to compare the actual values with.
        Returns:
        The mean of return values as output by the instance-wise measure.