info.ephyra.questionanalysis.atype.minorthird.hierarchical
Class Experimenter
java.lang.Object
info.ephyra.questionanalysis.atype.minorthird.hierarchical.Experimenter
public class Experimenter
- extends java.lang.Object
A utility class for running experiments with different combinations of the
property values required by HierarchicalClassifierTrainer.
- Version:
- 2008-02-10
- Author:
- Justin Betteridge
|
Constructor Summary |
Experimenter(edu.cmu.lti.util.Pair<edu.cmu.lti.javelin.util.Language,edu.cmu.lti.javelin.util.Language> languagePair)
|
|
Method Summary |
void |
initialize()
The input properties that must be defined are:
learningCombos : A "|"-separated list of comma-separated
lists of learning algorithms. |
boolean |
isInitialized()
|
static void |
main(java.lang.String[] args)
Calls runExperiment() or trainAndSave(), depending
on whether the --train command-line argument is specified. |
void |
runExperiments()
Runs the experiments specified in the input properties file. |
void |
setInitialized(boolean isInitialized)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.log4j.Logger log
learningCombos
private java.lang.String[] learningCombos
featureTypeCombos
private java.lang.String[] featureTypeCombos
properties
private Properties properties
languagePair
private edu.cmu.lti.util.Pair<edu.cmu.lti.javelin.util.Language,edu.cmu.lti.javelin.util.Language> languagePair
isInitialized
private boolean isInitialized
Experimenter
public Experimenter(edu.cmu.lti.util.Pair<edu.cmu.lti.javelin.util.Language,edu.cmu.lti.javelin.util.Language> languagePair)
initialize
public void initialize()
throws java.lang.Exception
- The input properties that must be defined are:
-
learningCombos : A "|"-separated list of comma-separated
lists of learning algorithms. The outer, "|"-separated list specifies the different hierarchical
classifiers to experiment with. The inner, comma-separated list of algorithms
specifies the structure of the hierarchical classifier to use for one
experiment.
The set of valid algorithm names is:
-
KNN
-
KWAY_MIX
-
MAX_ENT
-
BWINNOW_OVA
-
MPERCEPTRON_OVA
-
NBAYES_OVA
-
VPERCEPTRON_OVA
-
ADABOOST_OVA
-
ADABOOST_CB
-
ADABOOST_MFF
-
ADABOOSTL_OVA
-
ADABOOSTL_CB
-
ADABOOSTL_MFF
-
DTREE_OVA
-
DTREE_CB
-
DTREE_MFF
-
NEGBI_OVA
-
NEGBI_CB
-
NEGBI_MFF
-
SVM_OVA
-
SVM_CB
-
SVM_MFF
-
featureTypeCombos : A "|"-separated list of comma-separated
lists of feature types.
- Throws:
java.lang.Exception
isInitialized
public boolean isInitialized()
- Returns:
- the isInitialized
setInitialized
public void setInitialized(boolean isInitialized)
- Parameters:
isInitialized - the isInitialized to set
runExperiments
public void runExperiments()
- Runs the experiments specified in the input properties file. The set of
experiments run is the cross-product of the sets of algorithm configurations, training/testing
dataset configurations, and feature type combinations.
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Calls
runExperiment() or trainAndSave(), depending
on whether the --train command-line argument is specified. Also
requires two properties files as input arguments: one for specifying the experiments
to run and one for configuring EnglishFeatureExtractor
- Parameters:
args - input arguments: "[--train] <Experimenter-properties> <qa.properties>"
- Throws:
java.lang.Exception