public class AdhocEvaluation extends Evaluation
Evaluation.Record
Modifier and Type | Field and Description |
---|---|
protected double[] |
averagePrecisionOfEachQuery
The average precision of each query.
|
protected static org.apache.log4j.Logger |
logger |
protected int |
maxNumberRetrieved
The maximum number of documents retrieved for a query.
|
protected double |
meanAveragePrecision
Average Precision.
|
protected double |
meanRelevantPrecision
Relevant Precision.
|
protected int |
numberOfEffQuery
The number of effective queries.
|
protected static int[] |
PRECISION_PERCENTAGES |
protected static int[] |
PRECISION_RANKS |
protected gnu.trove.TIntDoubleHashMap |
precisionAtRank
Precision at rank number of documents
|
protected gnu.trove.TIntDoubleHashMap |
precisionAtRecall |
protected String[] |
queryNo
The query number of each query.
|
protected int |
totalNumberOfRelevant
The total number of relevant documents in the qrels file
for the queries processed in the task.
|
protected int |
totalNumberOfRelevantRetrieved
The total number of relevant documents retrieved in the task.
|
protected int |
totalNumberOfRetrieved
The total number of documents retrieved in the task.
|
qrels
Constructor and Description |
---|
AdhocEvaluation()
Create adhoc evaluation
|
AdhocEvaluation(String qrelsFile)
Create adhoc evaluation
|
AdhocEvaluation(String[] qrelsFiles)
Create adhoc evaluation
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate(String resultFilename)
Evaluates the given result file.
|
void |
initialise()
Initialise variables.
|
void |
writeEvaluationResult(PrintWriter out)
Output the evaluation result to the specific file.
|
void |
writeEvaluationResultOfEachQuery(String resultEvalFilename)
Output the evaluation result of each query to the specific file.
|
writeEvaluationResult, writeEvaluationResult
protected static final org.apache.log4j.Logger logger
protected static final int[] PRECISION_RANKS
protected static final int[] PRECISION_PERCENTAGES
protected int maxNumberRetrieved
protected int numberOfEffQuery
protected int totalNumberOfRetrieved
protected int totalNumberOfRelevant
protected int totalNumberOfRelevantRetrieved
protected gnu.trove.TIntDoubleHashMap precisionAtRank
protected gnu.trove.TIntDoubleHashMap precisionAtRecall
protected double meanAveragePrecision
protected double meanRelevantPrecision
protected double[] averagePrecisionOfEachQuery
protected String[] queryNo
public AdhocEvaluation()
public AdhocEvaluation(String qrelsFile)
qrelsFile
- public AdhocEvaluation(String[] qrelsFiles)
qrelsFiles
- public void initialise()
public void evaluate(String resultFilename)
evaluate
in class Evaluation
resultFilename
- String the filename of
the result file to evaluate.public void writeEvaluationResultOfEachQuery(String resultEvalFilename)
writeEvaluationResultOfEachQuery
in class Evaluation
resultEvalFilename
- String the name of the file in which to
save the evaluation results.public void writeEvaluationResult(PrintWriter out)
writeEvaluationResult
in class Evaluation
out
- java.io.PrintWriter the stream to which the results are printed.Terrier 4.0. Copyright © 2004-2014 University of Glasgow