Class Accuracy

  • All Implemented Interfaces:
    java.io.Serializable

    public class Accuracy
    extends Metric
    Accuracy metric.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Accuracy()
      Create the metric.
      Accuracy​(boolean formatPercent)
      Create the metric.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFormatString()
      Get the string to format the metric.
      double getMetric​(java.util.ArrayList<Matrix> output, java.util.ArrayList<Matrix> expected)
      Get the value of the metric.
      • Methods inherited from class java.lang.Object

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

      • Accuracy

        public Accuracy()
        Create the metric.
      • Accuracy

        public Accuracy​(boolean formatPercent)
        Create the metric.
        Parameters:
        formatPercent - whether to display the accuracy as a percent
    • Method Detail

      • getMetric

        public double getMetric​(java.util.ArrayList<Matrix> output,
                                java.util.ArrayList<Matrix> expected)
        Description copied from class: Metric
        Get the value of the metric.
        Specified by:
        getMetric in class Metric
        Parameters:
        output - output of network
        expected - expected output
        Returns:
        the metric value
      • getFormatString

        public java.lang.String getFormatString()
        Description copied from class: Metric
        Get the string to format the metric.

        Return a string that can be used with printf in conjunction with the metric.
        Example: "M: %.2f"

        Specified by:
        getFormatString in class Metric
        Returns:
        the string