public class Experiment
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.io.File |
corpusDir
The directory from which the indexed documents come.
|
java.io.File |
outFile
The output file where final recall/precision result data is printed.
|
java.io.File |
queryFile
The file with the list of queries and results to be tested.
|
static double[] |
RECALL_LEVELS
The standard recall levels for which we want to plot precision values
|
| Constructor and Description |
|---|
Experiment(java.io.File corpusDir,
java.io.File queryFile,
java.io.File outFile,
short docType,
boolean stem)
Create an Experiment object for generating Recall/Precision curves
|
Experiment(InvertedIndex index,
java.io.File queryFile,
java.io.File outFile)
Create an Experiment object for generating Recall/Precision curves
using a provided InvertedIndex
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Evaluate retrieval performance on a given query test corpus and
generate a recall/precision graph.
|
void |
makeRpCurve()
Process and evaluate all queries and generate recall-precision curve
|
public static final double[] RECALL_LEVELS
public java.io.File corpusDir
public java.io.File queryFile
public java.io.File outFile
public Experiment(java.io.File corpusDir,
java.io.File queryFile,
java.io.File outFile,
short docType,
boolean stem)
throws java.io.IOException
corpusDir - The directory of files to index.queryFile - The file of query/relevant-docs pairs to evaluate.outFile - File for output precision/recall data.docType - The type of documents to index (See docType in DocumentIterator).stem - Whether tokens should be stemmed with Porter stemmer.java.io.IOExceptionpublic Experiment(InvertedIndex index, java.io.File queryFile, java.io.File outFile) throws java.io.IOException
index - an InvertedIndex object that contains an indexed document collectionqueryFile - The file of query/relevant-docs pairs to evaluate.outFile - File for output precision/recall data.java.io.IOExceptionpublic void makeRpCurve()
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException