Record Class AccuracyMetrics.Result

java.lang.Object
java.lang.Record
org.egothor.methodatlas.eval.AccuracyMetrics.Result
Record Components:
relevance - securityRelevant confusion counts
tags - per-tag results sorted by tag name; includes every tag that appears in any prediction or label
tagsMicro - tag counts summed over all tags (micro-average basis)
tagsMacroF1 - unweighted mean of the per-tag F1 over every tag present in any prediction or label (including tags with zero support, i.e. ones the AI invented, which score F1 0); empty when no tag occurs at all
relevanceSamples - number of samples that took part in relevance
tagSamples - number of samples that took part in the tag metrics
Enclosing class:
AccuracyMetrics

public static record AccuracyMetrics.Result(AccuracyMetrics.Counts relevance, List<AccuracyMetrics.TagResult> tags, AccuracyMetrics.Counts tagsMicro, OptionalDouble tagsMacroF1, int relevanceSamples, int tagSamples) extends Record
The complete metric set.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • relevance

      public AccuracyMetrics.Counts relevance()
      Returns the value of the relevance record component.
      Returns:
      the value of the relevance record component
    • tags

      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • tagsMicro

      public AccuracyMetrics.Counts tagsMicro()
      Returns the value of the tagsMicro record component.
      Returns:
      the value of the tagsMicro record component
    • tagsMacroF1

      public OptionalDouble tagsMacroF1()
      Returns the value of the tagsMacroF1 record component.
      Returns:
      the value of the tagsMacroF1 record component
    • relevanceSamples

      public int relevanceSamples()
      Returns the value of the relevanceSamples record component.
      Returns:
      the value of the relevanceSamples record component
    • tagSamples

      public int tagSamples()
      Returns the value of the tagSamples record component.
      Returns:
      the value of the tagSamples record component