Record Class StemmerKnowledgeExperiment.ResultRow

java.lang.Object
java.lang.Record
org.egothor.stemmer.StemmerKnowledgeExperiment.ResultRow
Record Components:
language - language label
reductionMode - reduction mode name
storeOriginal - whether no-op patches were stored for canonical stems
includeStemInEvaluation - whether canonical stems were part of the evaluated inputs
knowledgePercent - retained knowledge percentage
seed - deterministic sampling seed
dictionaryEntryCount - total parsed dictionary entry count
trainingEntryCount - selected dictionary entry count used for build
evaluatedInputCount - total evaluated input count
getCorrectCount - number of correct preferred transformations
getAccuracy - preferred lookup accuracy
getAllTruePositiveCount - number of unique correct candidates from getAll()
getAllFalsePositiveCount - number of unique incorrect candidates from getAll()
getAllCoveredInputCount - number of inputs for which the correct stem appeared in getAll()
getAllPrecision - global candidate precision for getAll()
getAllRecall - global input recall for getAll()
getAllF1 - F1 score derived from getAll() precision and recall
averageUniqueCandidateCount - average number of unique candidate stems per input
Enclosing class:
StemmerKnowledgeExperiment

public static record StemmerKnowledgeExperiment.ResultRow(String language, String reductionMode, boolean storeOriginal, boolean includeStemInEvaluation, int knowledgePercent, long seed, int dictionaryEntryCount, long trainingEntryCount, long evaluatedInputCount, long getCorrectCount, double getAccuracy, long getAllTruePositiveCount, long getAllFalsePositiveCount, long getAllCoveredInputCount, double getAllPrecision, double getAllRecall, double getAllF1, double averageUniqueCandidateCount) extends Record
One immutable result row of the knowledge experiment.
  • Constructor Details

    • ResultRow

      public ResultRow(String language, String reductionMode, boolean storeOriginal, boolean includeStemInEvaluation, int knowledgePercent, long seed, int dictionaryEntryCount, long trainingEntryCount, long evaluatedInputCount, long getCorrectCount, double getAccuracy, long getAllTruePositiveCount, long getAllFalsePositiveCount, long getAllCoveredInputCount, double getAllPrecision, double getAllRecall, double getAllF1, double averageUniqueCandidateCount)
      Creates one immutable result row.
      Parameters:
      language - language label
      reductionMode - reduction mode name
      storeOriginal - whether no-op patches were stored for canonical stems
      includeStemInEvaluation - whether canonical stems were evaluated
      knowledgePercent - retained knowledge percentage
      seed - deterministic sampling seed
      dictionaryEntryCount - total dictionary entry count
      trainingEntryCount - selected training entry count
      evaluatedInputCount - total evaluated input count
      getCorrectCount - number of correct preferred transformations
      getAccuracy - preferred lookup accuracy
      getAllTruePositiveCount - number of unique correct candidates
      getAllFalsePositiveCount - number of unique incorrect candidates
      getAllCoveredInputCount - coverage count for getAll()
      getAllPrecision - global candidate precision for getAll()
      getAllRecall - global input recall for getAll()
      getAllF1 - harmonic mean of precision and recall
      averageUniqueCandidateCount - average unique candidate count per input
  • Method Details

    • csvHeader

      public static String csvHeader()
      Returns the stable CSV header of this result format.
      Returns:
      CSV header line
    • toCsvRow

      public String toCsvRow()
      Serializes this row as one CSV record.
      Returns:
      CSV record
    • 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.
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • reductionMode

      public String reductionMode()
      Returns the value of the reductionMode record component.
      Returns:
      the value of the reductionMode record component
    • storeOriginal

      public boolean storeOriginal()
      Returns the value of the storeOriginal record component.
      Returns:
      the value of the storeOriginal record component
    • includeStemInEvaluation

      public boolean includeStemInEvaluation()
      Returns the value of the includeStemInEvaluation record component.
      Returns:
      the value of the includeStemInEvaluation record component
    • knowledgePercent

      public int knowledgePercent()
      Returns the value of the knowledgePercent record component.
      Returns:
      the value of the knowledgePercent record component
    • seed

      public long seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component
    • dictionaryEntryCount

      public int dictionaryEntryCount()
      Returns the value of the dictionaryEntryCount record component.
      Returns:
      the value of the dictionaryEntryCount record component
    • trainingEntryCount

      public long trainingEntryCount()
      Returns the value of the trainingEntryCount record component.
      Returns:
      the value of the trainingEntryCount record component
    • evaluatedInputCount

      public long evaluatedInputCount()
      Returns the value of the evaluatedInputCount record component.
      Returns:
      the value of the evaluatedInputCount record component
    • getCorrectCount

      public long getCorrectCount()
      Returns the value of the getCorrectCount record component.
      Returns:
      the value of the getCorrectCount record component
    • getAccuracy

      public double getAccuracy()
      Returns the value of the getAccuracy record component.
      Returns:
      the value of the getAccuracy record component
    • getAllTruePositiveCount

      public long getAllTruePositiveCount()
      Returns the value of the getAllTruePositiveCount record component.
      Returns:
      the value of the getAllTruePositiveCount record component
    • getAllFalsePositiveCount

      public long getAllFalsePositiveCount()
      Returns the value of the getAllFalsePositiveCount record component.
      Returns:
      the value of the getAllFalsePositiveCount record component
    • getAllCoveredInputCount

      public long getAllCoveredInputCount()
      Returns the value of the getAllCoveredInputCount record component.
      Returns:
      the value of the getAllCoveredInputCount record component
    • getAllPrecision

      public double getAllPrecision()
      Returns the value of the getAllPrecision record component.
      Returns:
      the value of the getAllPrecision record component
    • getAllRecall

      public double getAllRecall()
      Returns the value of the getAllRecall record component.
      Returns:
      the value of the getAllRecall record component
    • getAllF1

      public double getAllF1()
      Returns the value of the getAllF1 record component.
      Returns:
      the value of the getAllF1 record component
    • averageUniqueCandidateCount

      public double averageUniqueCandidateCount()
      Returns the value of the averageUniqueCandidateCount record component.
      Returns:
      the value of the averageUniqueCandidateCount record component