Package org.egothor.methodatlas.eval
Record Class AccuracyMetrics.Sample
java.lang.Object
java.lang.Record
org.egothor.methodatlas.eval.AccuracyMetrics.Sample
- Record Components:
id- stable identifier, used only for diagnosticspredictedRelevant- the AI'ssecurityRelevantdecisiontruthRelevant- the humansecurityRelevantlabel, ornullwhen the label does not decide relevance (the sample is then excluded from the relevance confusion matrix)predictedTags- the AI's tags;nullis treated as emptytruthTags- the human tag set, ornullwhen the label does not decide tags (the sample is then excluded from the tag metrics); an empty set is a real label meaning "no tags"
- Enclosing class:
AccuracyMetrics
public static record AccuracyMetrics.Sample(String id, boolean predictedRelevant, Boolean truthRelevant, Collection<String> predictedTags, Collection<String> truthTags)
extends Record
One method for which a prediction is compared with a human label.
-
Constructor Summary
ConstructorsConstructorDescriptionSample(String id, boolean predictedRelevant, Boolean truthRelevant, Collection<String> predictedTags, Collection<String> truthTags) Creates an instance of aSamplerecord 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.id()Returns the value of theidrecord component.booleanReturns the value of thepredictedRelevantrecord component.Returns the value of thepredictedTagsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetruthRelevantrecord component.Returns the value of thetruthTagsrecord component.
-
Constructor Details
-
Sample
public Sample(String id, boolean predictedRelevant, Boolean truthRelevant, Collection<String> predictedTags, Collection<String> truthTags) Creates an instance of aSamplerecord class.- Parameters:
id- the value for theidrecord componentpredictedRelevant- the value for thepredictedRelevantrecord componenttruthRelevant- the value for thetruthRelevantrecord componentpredictedTags- the value for thepredictedTagsrecord componenttruthTags- the value for thetruthTagsrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
predictedRelevant
public boolean predictedRelevant()Returns the value of thepredictedRelevantrecord component.- Returns:
- the value of the
predictedRelevantrecord component
-
truthRelevant
Returns the value of thetruthRelevantrecord component.- Returns:
- the value of the
truthRelevantrecord component
-
predictedTags
Returns the value of thepredictedTagsrecord component.- Returns:
- the value of the
predictedTagsrecord component
-
truthTags
Returns the value of thetruthTagsrecord component.- Returns:
- the value of the
truthTagsrecord component
-