Class MACFACRetrieverEvaluation<TCase extends DataObject>
java.lang.Object
de.uni_trier.wi2.procake.utils.eval.RetrieverEvaluation<TCase>
de.uni_trier.wi2.procake.utils.eval.MACFACRetrieverEvaluation<TCase>
- Author:
- Maximilian Hoffmann
-
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.utils.eval.RetrieverEvaluation
decimalFormat, groundTruthSimilarities, k, logger, metricResults, metrics, retrievalTimeResultMap, retrievers, similarityResults, trackSimilarityResults, trainingObjectPool
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMain method for performing the evaluation of the given retrievers according to the specified parameters.void
setFacGTRetriever
(Retriever<TCase, Query> facGTRetriever) void
setFilterSizes
(int[] filterSizes) The filter sizes determine the number of results from the MAC phase.void
setKs
(int[] ks) K determines the number of final results.writeMetricResultsAsCSV
(OutputStream outputStream) Writes metric results as CSV file to an output stream.Methods inherited from class de.uni_trier.wi2.procake.utils.eval.RetrieverEvaluation
addMetricsToEvaluate, addMetricToEvaluate, addRetrieversToEvaluate, addRetrieverToEvaluate, getK, getMetricResultsAsCSVString, getSimilarityResults, getSimilarityResultsAsCSVString, importGroundTruthSimilarities, printMetricResultsAsASCIITable, setDecimalFormat, setGroundTruthSimilarities, setK, setTrainTestCaseBase, trackSimilarityResults, writeMetricResultsAsCSV, writeSimilarityResultsAsCSV, writeSimilarityResultsAsCSV
-
Constructor Details
-
MACFACRetrieverEvaluation
public MACFACRetrieverEvaluation()
-
-
Method Details
-
performEvaluation
Main method for performing the evaluation of the given retrievers according to the specified parameters. Assumes that ProCAKE was already started (CakeInstance.start()
).- Overrides:
performEvaluation
in classRetrieverEvaluation<TCase extends DataObject>
- Returns:
- the evaluation results as a map with a
RetrieverFSKMetricKeyPair
as key and a double as value. - Throws:
RetrieverEvaluationException
- if something goes wrong while evaluating
-
setFilterSizes
public void setFilterSizes(int[] filterSizes) The filter sizes determine the number of results from the MAC phase.- Parameters:
filterSizes
- An array of filter sizes to use.
-
setKs
public void setKs(int[] ks) K determines the number of final results.- Parameters:
ks
- An array of k values to use.
-
setFacGTRetriever
-
writeMetricResultsAsCSV
public String writeMetricResultsAsCSV(OutputStream outputStream) throws IOException, RetrieverEvaluationException Description copied from class:RetrieverEvaluation
Writes metric results as CSV file to an output stream. The calling method is responsible for closing the stream afterwards!- Overrides:
writeMetricResultsAsCSV
in classRetrieverEvaluation<TCase extends DataObject>
- Parameters:
outputStream
- the stream to write the results to- Returns:
- the evaluation results as a CSV string
- Throws:
IOException
- if something goes wrong during export. Ignore if you do not want to export any values.RetrieverEvaluationException
- if something goes wrong while evaluating
-