Package dev.dokimos.core
Record Class RunResult
java.lang.Object
java.lang.Record
dev.dokimos.core.RunResult
- Record Components:
runIndex- the zero-based index of this runitemResults- results for each dataset example in this run
Results from a single run of an experiment.
When an experiment is configured with multiple runs, each run produces
a RunResult containing the evaluation results for that run. The
parent ExperimentResult aggregates these across all runs.
-
Constructor Summary
ConstructorsConstructorDescriptionRunResult(int runIndex, List<ItemResult> itemResults) Creates an instance of aRunResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleaverageScore(String evaluatorName) Returns the average score for the specified evaluator across all items in this run.final booleanIndicates whether some other object is "equal to" this one.longReturns the number of items that failed at least one evaluation in this run.final inthashCode()Returns a hash code value for this object.Returns the value of theitemResultsrecord component.longReturns the number of items that passed all evaluations in this run.doublepassRate()Returns the proportion of items that passed in this run.intrunIndex()Returns the value of therunIndexrecord component.final StringtoString()Returns a string representation of this record class.intReturns the total number of items evaluated in this run.
-
Constructor Details
-
RunResult
Creates an instance of aRunResultrecord class.- Parameters:
runIndex- the value for therunIndexrecord componentitemResults- the value for theitemResultsrecord component
-
-
Method Details
-
totalCount
public int totalCount()Returns the total number of items evaluated in this run.- Returns:
- the total count
-
passCount
public long passCount()Returns the number of items that passed all evaluations in this run.- Returns:
- the pass count
-
failCount
public long failCount()Returns the number of items that failed at least one evaluation in this run.- Returns:
- the fail count
-
passRate
public double passRate()Returns the proportion of items that passed in this run.- Returns:
- the pass rate between 0.0 and 1.0
-
averageScore
Returns the average score for the specified evaluator across all items in this run.- Parameters:
evaluatorName- the evaluator's name- Returns:
- the computed average score
-
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 '=='. -
runIndex
public int runIndex()Returns the value of therunIndexrecord component.- Returns:
- the value of the
runIndexrecord component
-
itemResults
Returns the value of theitemResultsrecord component.- Returns:
- the value of the
itemResultsrecord component
-