Package com.jml.core

Class Metrics

java.lang.Object
com.jml.core.Metrics

public class Metrics extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    accuracy​(double[][] predictions, double[][] targets)
    Computes the accuracy between predictions and the true targets.
    static double
    accuracy​(double[] predictions, double[] targets)
    Computes the accuracy between predictions and the true targets.
    static double
    accuracy​(int[] predictions, int[] targets)
    Computes the accuracy between predictions and the true targets.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • accuracy

      public static double accuracy(double[][] predictions, double[][] targets)
      Computes the accuracy between predictions and the true targets.
      Parameters:
      predictions - Predictions of the true targets.
      targets - True targets.
      Returns:
      The percentage of correct predictions
    • accuracy

      public static double accuracy(double[] predictions, double[] targets)
      Computes the accuracy between predictions and the true targets.
      Parameters:
      predictions - Predictions of the true targets.
      targets - True targets.
      Returns:
      The percentage of correct predictions
    • accuracy

      public static double accuracy(int[] predictions, int[] targets)
      Computes the accuracy between predictions and the true targets.
      Parameters:
      predictions - Predictions of the true targets.
      targets - True targets.
      Returns:
      The percentage of correct predictions