Package org.egothor.stemmer
Record Class StemmerKnowledgeExperiment.ResultRow
java.lang.Object
java.lang.Record
org.egothor.stemmer.StemmerKnowledgeExperiment.ResultRow
- Record Components:
language- language labelreductionMode- reduction mode namestoreOriginal- whether no-op patches were stored for canonical stemsincludeStemInEvaluation- whether canonical stems were part of the evaluated inputsknowledgePercent- retained knowledge percentageseed- deterministic sampling seeddictionaryEntryCount- total parsed dictionary entry counttrainingEntryCount- selected dictionary entry count used for buildevaluatedInputCount- total evaluated input countgetCorrectCount- number of correct preferred transformationsgetAccuracy- preferred lookup accuracygetAllTruePositiveCount- number of unique correct candidates fromgetAll()getAllFalsePositiveCount- number of unique incorrect candidates fromgetAll()getAllCoveredInputCount- number of inputs for which the correct stem appeared ingetAll()getAllPrecision- global candidate precision forgetAll()getAllRecall- global input recall forgetAll()getAllF1- F1 score derived fromgetAll()precision and recallaverageUniqueCandidateCount- 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 Summary
ConstructorsConstructorDescriptionResultRow(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. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaverageUniqueCandidateCountrecord component.static StringReturns the stable CSV header of this result format.intReturns the value of thedictionaryEntryCountrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theevaluatedInputCountrecord component.doubleReturns the value of thegetAccuracyrecord component.longReturns the value of thegetAllCoveredInputCountrecord component.doublegetAllF1()Returns the value of thegetAllF1record component.longReturns the value of thegetAllFalsePositiveCountrecord component.doubleReturns the value of thegetAllPrecisionrecord component.doubleReturns the value of thegetAllRecallrecord component.longReturns the value of thegetAllTruePositiveCountrecord component.longReturns the value of thegetCorrectCountrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludeStemInEvaluationrecord component.intReturns the value of theknowledgePercentrecord component.language()Returns the value of thelanguagerecord component.Returns the value of thereductionModerecord component.longseed()Returns the value of theseedrecord component.booleanReturns the value of thestoreOriginalrecord component.toCsvRow()Serializes this row as one CSV record.final StringtoString()Returns a string representation of this record class.longReturns the value of thetrainingEntryCountrecord component.
-
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 labelreductionMode- reduction mode namestoreOriginal- whether no-op patches were stored for canonical stemsincludeStemInEvaluation- whether canonical stems were evaluatedknowledgePercent- retained knowledge percentageseed- deterministic sampling seeddictionaryEntryCount- total dictionary entry counttrainingEntryCount- selected training entry countevaluatedInputCount- total evaluated input countgetCorrectCount- number of correct preferred transformationsgetAccuracy- preferred lookup accuracygetAllTruePositiveCount- number of unique correct candidatesgetAllFalsePositiveCount- number of unique incorrect candidatesgetAllCoveredInputCount- coverage count forgetAll()getAllPrecision- global candidate precision forgetAll()getAllRecall- global input recall forgetAll()getAllF1- harmonic mean of precision and recallaverageUniqueCandidateCount- average unique candidate count per input
-
-
Method Details
-
csvHeader
Returns the stable CSV header of this result format.- Returns:
- CSV header line
-
toCsvRow
Serializes this row as one CSV record.- Returns:
- CSV record
-
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 '=='. -
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
reductionMode
Returns the value of thereductionModerecord component.- Returns:
- the value of the
reductionModerecord component
-
storeOriginal
public boolean storeOriginal()Returns the value of thestoreOriginalrecord component.- Returns:
- the value of the
storeOriginalrecord component
-
includeStemInEvaluation
public boolean includeStemInEvaluation()Returns the value of theincludeStemInEvaluationrecord component.- Returns:
- the value of the
includeStemInEvaluationrecord component
-
knowledgePercent
public int knowledgePercent()Returns the value of theknowledgePercentrecord component.- Returns:
- the value of the
knowledgePercentrecord component
-
seed
public long seed()Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-
dictionaryEntryCount
public int dictionaryEntryCount()Returns the value of thedictionaryEntryCountrecord component.- Returns:
- the value of the
dictionaryEntryCountrecord component
-
trainingEntryCount
public long trainingEntryCount()Returns the value of thetrainingEntryCountrecord component.- Returns:
- the value of the
trainingEntryCountrecord component
-
evaluatedInputCount
public long evaluatedInputCount()Returns the value of theevaluatedInputCountrecord component.- Returns:
- the value of the
evaluatedInputCountrecord component
-
getCorrectCount
public long getCorrectCount()Returns the value of thegetCorrectCountrecord component.- Returns:
- the value of the
getCorrectCountrecord component
-
getAccuracy
public double getAccuracy()Returns the value of thegetAccuracyrecord component.- Returns:
- the value of the
getAccuracyrecord component
-
getAllTruePositiveCount
public long getAllTruePositiveCount()Returns the value of thegetAllTruePositiveCountrecord component.- Returns:
- the value of the
getAllTruePositiveCountrecord component
-
getAllFalsePositiveCount
public long getAllFalsePositiveCount()Returns the value of thegetAllFalsePositiveCountrecord component.- Returns:
- the value of the
getAllFalsePositiveCountrecord component
-
getAllCoveredInputCount
public long getAllCoveredInputCount()Returns the value of thegetAllCoveredInputCountrecord component.- Returns:
- the value of the
getAllCoveredInputCountrecord component
-
getAllPrecision
public double getAllPrecision()Returns the value of thegetAllPrecisionrecord component.- Returns:
- the value of the
getAllPrecisionrecord component
-
getAllRecall
public double getAllRecall()Returns the value of thegetAllRecallrecord component.- Returns:
- the value of the
getAllRecallrecord component
-
getAllF1
public double getAllF1()Returns the value of thegetAllF1record component.- Returns:
- the value of the
getAllF1record component
-
averageUniqueCandidateCount
public double averageUniqueCandidateCount()Returns the value of theaverageUniqueCandidateCountrecord component.- Returns:
- the value of the
averageUniqueCandidateCountrecord component
-