Class EvaluatorBasic
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.Evaluator
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.EvaluatorBasic
A basic evaluator that is easy on Memory and prints the performance results per test case in CSV format.
No track aggregation is performed. If you are interested in an in-depth analysis (and if you have enough memory), you should use
EvaluatorCSV
.-
Field Summary
Modifier and TypeFieldDescriptionThe alignment extensions that are to be printed.private boolean
If true: Alignment extensions are printed in CSV.private static final org.slf4j.Logger
Default logger.private ConfusionMatrixMetric
the ConfusionMatrixMetric to be used for evaluationprivate static final String
Name of the file that will be written to the base directory. -
Constructor Summary
ConstructorDescriptionEvaluatorBasic
(ExecutionResultSet results) Constructor.EvaluatorBasic
(ExecutionResultSet results, ConfusionMatrixMetric metric) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate String[]
determineExtensionValuesToWriteForCSV
(Map<String, Object> existingExtensionValues) Given the existing extension values of an alignment, determine what to write in the CSV file.getAlignmentExtensions
(ExecutionResultSet results) This method determines the uniqueAlignment
extensions that are used in the alignments in the ExecutionResultSet.Get the header row for the results.static String
boolean
void
setPrintAlignmentExtensions
(boolean printAlignmentExtensions) (package private) String[]
toStringArrayWithArrayAtTheEnd
(String[] putAtTheEnd, Object... individualValues) Creates one string array where theputAtTheEnd
values are arranged at the end of the string.protected void
writeResultsToDirectory
(File baseDirectory) Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.Evaluator
checkAndCreateDirectory, getDefaultResultsDirectory, getDirectoryWithCurrentTime, getResults, getResultsDirectoryTrack, getResultsDirectoryTrackMatcher, getResultsDirectoryTrackTestcaseMatcher, setDefaultResultsDirectory, writeToDirectory, writeToDirectory, writeToDirectory
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGERDefault logger. -
RESULT_FILE_NAME
Name of the file that will be written to the base directory.- See Also:
-
alignmentExtensions
The alignment extensions that are to be printed. -
isPrintAlignmentExtensions
private boolean isPrintAlignmentExtensionsIf true: Alignment extensions are printed in CSV. -
metric
the ConfusionMatrixMetric to be used for evaluation
-
-
Constructor Details
-
EvaluatorBasic
Constructor.- Parameters:
results
- The results of the matching process that shall be evaluated.
-
EvaluatorBasic
Constructor.- Parameters:
results
- The results of the matching process that shall be evaluated.metric
- The ConfusionMatrixMetric to be used for evaluation
-
-
Method Details
-
writeResultsToDirectory
- Specified by:
writeResultsToDirectory
in classEvaluator
-
getHeader
Get the header row for the results.- Returns:
- Header row in the form of a String-List.
-
getAlignmentExtensions
This method determines the uniqueAlignment
extensions that are used in the alignments in the ExecutionResultSet.- Parameters:
results
- The result set of which- Returns:
- A list of unique alignment extensions that are used.
-
toStringArrayWithArrayAtTheEnd
Creates one string array where theputAtTheEnd
values are arranged at the end of the string.- Parameters:
putAtTheEnd
- To be put at the end.individualValues
- Some String values.- Returns:
- One String array where first values from
individualValues
and then the values fromputAtTheEnd
are appearing.
-
determineExtensionValuesToWriteForCSV
Given the existing extension values of an alignment, determine what to write in the CSV file.- Parameters:
existingExtensionValues
- The existing extension values in the alignment.- Returns:
- Tokenized extension values in the correct order for the CSV file to print.
-
getResultFileName
-
isPrintAlignmentExtensions
public boolean isPrintAlignmentExtensions() -
setPrintAlignmentExtensions
public void setPrintAlignmentExtensions(boolean printAlignmentExtensions)
-