Package org.egothor.methodatlas.eval
Record Class AccuracyMetrics.Result
java.lang.Object
java.lang.Record
org.egothor.methodatlas.eval.AccuracyMetrics.Result
- Record Components:
relevance- securityRelevant confusion counts- per-tag results sorted by tag name; includes every tag that appears in any prediction or label- tag counts summed over all tags (micro-average basis)- 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 allrelevanceSamples- number of samples that took part inrelevancetagSamples- 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 Summary
ConstructorsConstructorDescriptionResult(AccuracyMetrics.Counts relevance, List<AccuracyMetrics.TagResult> tags, AccuracyMetrics.Counts tagsMicro, OptionalDouble tagsMacroF1, int relevanceSamples, int tagSamples) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therelevancerecord component.intReturns the value of therelevanceSamplesrecord component.tags()Returns the value of thetagsrecord component.intReturns the value of thetagSamplesrecord component.Returns the value of thetagsMacroF1record component.Returns the value of thetagsMicrorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Result
public Result(AccuracyMetrics.Counts relevance, List<AccuracyMetrics.TagResult> tags, AccuracyMetrics.Counts tagsMicro, OptionalDouble tagsMacroF1, int relevanceSamples, int tagSamples) Creates an instance of aResultrecord class.- Parameters:
relevance- the value for therelevancerecord componenttags- the value for thetagsrecord componenttagsMicro- the value for thetagsMicrorecord componenttagsMacroF1- the value for thetagsMacroF1record componentrelevanceSamples- the value for therelevanceSamplesrecord componenttagSamples- the value for thetagSamplesrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
relevance
Returns the value of therelevancerecord component.- Returns:
- the value of the
relevancerecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
tagsMicro
Returns the value of thetagsMicrorecord component.- Returns:
- the value of the
tagsMicrorecord component
-
tagsMacroF1
Returns the value of thetagsMacroF1record component.- Returns:
- the value of the
tagsMacroF1record component
-
relevanceSamples
public int relevanceSamples()Returns the value of therelevanceSamplesrecord component.- Returns:
- the value of the
relevanceSamplesrecord component
-
tagSamples
public int tagSamples()Returns the value of thetagSamplesrecord component.- Returns:
- the value of the
tagSamplesrecord component
-