Class MACFACRetrieverEvaluation
- java.lang.Object
-
- de.uni_trier.wi2.procake.utils.eval.RetrieverEvaluation
-
- de.uni_trier.wi2.procake.utils.eval.MACFACRetrieverEvaluation
-
public class MACFACRetrieverEvaluation extends RetrieverEvaluation
- 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
Constructors Constructor Description MACFACRetrieverEvaluation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<RetrieverMetricKeyPair,Double>performEvaluation()Main method for performing the evaluation of the given retrievers according to the specified parameters.voidsetFacGTRetriever(Retriever<NESTWorkflowObject,Query> facGTRetriever)voidsetFilterSizes(int[] filterSizes)The filter sizes determine the number of results from the MAC phase.voidsetKs(int[] ks)K determines the number of final results.StringwriteMetricResultsAsCSV(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, getSimilarityResultsAsCSVString, importGroundTruthSimilarities, printMetricResultsAsASCIITable, setDecimalFormat, setGroundTruthSimilarities, setK, setTrainTestCaseBase, trackSimilarityResults, writeMetricResultsAsCSV, writeSimilarityResultsAsCSV, writeSimilarityResultsAsCSV
-
-
-
-
Method Detail
-
performEvaluation
public Map<RetrieverMetricKeyPair,Double> performEvaluation() throws RetrieverEvaluationException
Main method for performing the evaluation of the given retrievers according to the specified parameters. Assumes that ProCAKE was already started (CakeInstance.start()).- Overrides:
performEvaluationin classRetrieverEvaluation- Returns:
- the evaluation results as a map with a
RetrieverFSKMetricKeyPairas 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
public void setFacGTRetriever(Retriever<NESTWorkflowObject,Query> facGTRetriever)
-
writeMetricResultsAsCSV
public String writeMetricResultsAsCSV(OutputStream outputStream) throws IOException, RetrieverEvaluationException
Description copied from class:RetrieverEvaluationWrites metric results as CSV file to an output stream. The calling method is responsible for closing the stream afterwards!- Overrides:
writeMetricResultsAsCSVin classRetrieverEvaluation- 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
-
-