edu.georgetown.gucs.experiment
Class ParameterSearchTrial

java.lang.Object
  extended by edu.georgetown.gucs.experiment.Trial
      extended by edu.georgetown.gucs.experiment.ParameterSearchTrial
All Implemented Interfaces:
java.lang.Runnable

public class ParameterSearchTrial
extends Trial

The ParameterSearchTrial class is the Trial class without the database back-end.

Author:
Lindsay Neubauer

Field Summary
static int FALSE_NEGATIVE
           
static int FALSE_POSITIVE
           
static int FSCORE
           
static int PRECISION
           
static int RECALL
           
static int TRUE_NEGATIVE
           
static int TRUE_POSITIVE
           
 
Fields inherited from class edu.georgetown.gucs.experiment.Trial
comparisonType, dataset, datasetFiles, datasetPath, dictionary, dictionaryCountNotPercent, dictionarySetting, experiment, fingerprinter, fingerprintIDfingerprintHash, fingerprintIDManglerIDHash, language, manglerIDs, manglerSettings, matcher, matcherParameter, maxIDF, minIDF, random, randomSeed, sampleCountNotPercent, sampleSetting, tokenizers
 
Constructor Summary
ParameterSearchTrial(java.lang.String newDataset)
          Constructor
 
Method Summary
 void doComparisons()
          Compares the mangled and unmangled fingerprints to each other.
 java.util.TreeMap<java.lang.String,java.lang.Double[]> getManglerResults()
          Sleeps until the trial is finished and then returns the results for each mangler.
 void getTrialResults()
          Computes the precision, recall, and f-score for each mangler.
 int runTrial()
           
protected  void takeFingerprints(java.lang.String manglerSettingString, java.util.Iterator<java.io.File> files, java.lang.Boolean unmangled)
          Takes mangled or unmangled fingerprints for each file in the given file iterator.
 
Methods inherited from class edu.georgetown.gucs.experiment.Trial
createDictionaryFromDirectory, createDictionaryFromFileLister, getTrialParameters, printParameters, run, sanityCheckParameters, setComparison, setDatasetFiles, setDatasetPath, setDictionaryCountNotPercent, setDictionaryLanguage, setDictionarySetting, setFingerprinter, setFingerprinter, setManglerSettings, setMatcher, setMatcher, setMatcherScore, setMaxIDF, setMinIDF, setRandomSeed, setSampleCountNotPercent, setSampleSetting, setTokenizerList, showManglerSetting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE_POSITIVE

public static final int TRUE_POSITIVE
See Also:
Constant Field Values

FALSE_POSITIVE

public static final int FALSE_POSITIVE
See Also:
Constant Field Values

TRUE_NEGATIVE

public static final int TRUE_NEGATIVE
See Also:
Constant Field Values

FALSE_NEGATIVE

public static final int FALSE_NEGATIVE
See Also:
Constant Field Values

PRECISION

public static final int PRECISION
See Also:
Constant Field Values

RECALL

public static final int RECALL
See Also:
Constant Field Values

FSCORE

public static final int FSCORE
See Also:
Constant Field Values
Constructor Detail

ParameterSearchTrial

public ParameterSearchTrial(java.lang.String newDataset)
Constructor

Parameters:
newDataset - String of the dataset to be used in this trial.
Method Detail

takeFingerprints

protected void takeFingerprints(java.lang.String manglerSettingString,
                                java.util.Iterator<java.io.File> files,
                                java.lang.Boolean unmangled)
Takes mangled or unmangled fingerprints for each file in the given file iterator.

Overrides:
takeFingerprints in class Trial
Parameters:
manglerSettingString - String containing the mangler settings to use if unmangled is set to false.
files - Iterator of the files to fingerprint.
unmangled - Boolean for whether to mangle the files before fingerprinting them.

doComparisons

public void doComparisons()
Compares the mangled and unmangled fingerprints to each other.

Overrides:
doComparisons in class Trial

getTrialResults

public void getTrialResults()
Computes the precision, recall, and f-score for each mangler.


getManglerResults

public java.util.TreeMap<java.lang.String,java.lang.Double[]> getManglerResults()
Sleeps until the trial is finished and then returns the results for each mangler.

Overrides:
getManglerResults in class Trial
Returns:
A TreeMap containing the manglers results from the trial.

runTrial

public int runTrial()
Overrides:
runTrial in class Trial