Record Class RunResult

java.lang.Object
java.lang.Record
dev.dokimos.core.RunResult
Record Components:
runIndex - the zero-based index of this run
itemResults - results for each dataset example in this run

public record RunResult(int runIndex, List<ItemResult> itemResults) extends Record
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

    Constructors
    Constructor
    Description
    RunResult(int runIndex, List<ItemResult> itemResults)
    Creates an instance of a RunResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    averageScore(String evaluatorName)
    Returns the average score for the specified evaluator across all items in this run.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the number of items that failed at least one evaluation in this run.
    final int
    Returns a hash code value for this object.
    Returns the value of the itemResults record component.
    long
    Returns the number of items that passed all evaluations in this run.
    double
    Returns the proportion of items that passed in this run.
    int
    Returns the value of the runIndex record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the total number of items evaluated in this run.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RunResult

      public RunResult(int runIndex, List<ItemResult> itemResults)
      Creates an instance of a RunResult record class.
      Parameters:
      runIndex - the value for the runIndex record component
      itemResults - the value for the itemResults record 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

      public double averageScore(String evaluatorName)
      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

      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.
    • runIndex

      public int runIndex()
      Returns the value of the runIndex record component.
      Returns:
      the value of the runIndex record component
    • itemResults

      public List<ItemResult> itemResults()
      Returns the value of the itemResults record component.
      Returns:
      the value of the itemResults record component