autoweka
Class ExperimentConstructor

java.lang.Object
  extended by autoweka.ExperimentConstructor
Direct Known Subclasses:
IRaceExperimentConstructor, RandomSearchExperimentConstructor, SMACExperimentConstructor, TPEExperimentConstructor

public abstract class ExperimentConstructor
extends java.lang.Object

Abstract class responsible for generating all the necessary stuff to run an Auto-WEKA Experiment. Although this class is static, you should use it's main method to actually do the experiment construction. In particular, if you run it with cmd line arguments of a number of ExperimentBatch XML files, it will do the appropriate generation for you by calling the right classes


Field Summary
protected  java.util.List<java.lang.String> mAllowedClassifiers
          List containing what classifiers are allowed to be used by this experiment
protected  java.util.List<ClassParams> mAttribEvalClassParams
           
protected  java.util.List<ClassParams> mAttribSearchClassParams
           
protected  java.util.List<ClassParams> mBaseClassParams
           
protected  java.util.List<ClassParams> mEnsembleClassParams
           
protected  int mEnsembleMaxNum
          How deep should the ensemble tree go?
protected  Experiment mExperiment
          The active Experiment that we're trying to build
protected  java.lang.String mExperimentPath
          The output path for the experiments
protected  boolean mIncludeBase
           
protected  boolean mIncludeEnsemble
           
protected  boolean mIncludeMeta
           
protected  InstanceGenerator mInstanceGenerator
          The instance generator we're using, all loaded up and ready to go with the appropriate dataset
protected  java.util.List<ClassParams> mMetaClassParams
           
protected  java.lang.String mParamBaseDir
          The directory with all the param files in it.
protected  java.util.Properties mProperties
          Properties associated with our constructor.
 
Constructor Summary
ExperimentConstructor()
           
 
Method Summary
static void buildSingle(java.lang.String builderClassName, Experiment exp, java.util.List<java.lang.String> args)
           
 ParameterConditionalGroup generateAlgorithmParameterConditionalGroupForDAG()
          Populates a ParameterConditionalGroup with all the params/conditionals that are needed for optimization methods that support a DAG structure
static void generateBatches(java.lang.String xmlFile)
           
protected abstract  java.util.List<java.lang.String> getCallString(java.lang.String experimentPath)
          Gets the set of strings that are called on the command line to invoke the SMBO method
protected  java.util.List<java.lang.String> getEnvVariables()
          Gets a list of all the environment variables that need to be set for this experiment to run
 java.lang.String getPrefix(java.lang.String classifierName)
          Gets a prefix out of the classifier name by stripping all the packages and capital letters - needed to ensure that parameters with the same WEKA name don't collide.
protected abstract  java.lang.String getTrajectoryParserClassName()
          Gets the name of the class that is used to parse the results of the SMBO method into a Trajectory
protected abstract  java.lang.String getType()
          Get a string indicating the type of this Experiment (namely the name of the SMBO method)
protected  java.lang.String getWrapperPropString()
          Useful for subclasses so that they can get some of the handy properties that they'll need to pass to their wrappers
static void main(java.lang.String[] args)
          Main method that can either take stuff on the command line to build a single experiment, or points to an ExperimentBatch XML file.
abstract  void prepareExperiment(java.lang.String path)
          Subclasses must provide this method which is responsible for
 void processArg(java.lang.String arg, java.util.Queue<java.lang.String> args)
          Process a constructor argument, and suck out stuff from the arg queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mParamBaseDir

protected java.lang.String mParamBaseDir
The directory with all the param files in it.


mBaseClassParams

protected java.util.List<ClassParams> mBaseClassParams

mMetaClassParams

protected java.util.List<ClassParams> mMetaClassParams

mEnsembleClassParams

protected java.util.List<ClassParams> mEnsembleClassParams

mAttribSearchClassParams

protected java.util.List<ClassParams> mAttribSearchClassParams

mAttribEvalClassParams

protected java.util.List<ClassParams> mAttribEvalClassParams

mAllowedClassifiers

protected java.util.List<java.lang.String> mAllowedClassifiers
List containing what classifiers are allowed to be used by this experiment


mEnsembleMaxNum

protected int mEnsembleMaxNum
How deep should the ensemble tree go?


mIncludeBase

protected boolean mIncludeBase

mIncludeMeta

protected boolean mIncludeMeta

mIncludeEnsemble

protected boolean mIncludeEnsemble

mExperimentPath

protected java.lang.String mExperimentPath
The output path for the experiments


mExperiment

protected Experiment mExperiment
The active Experiment that we're trying to build


mProperties

protected java.util.Properties mProperties
Properties associated with our constructor. These are defined in a file in the CWD that has the form CANONICAL_CLASS_NAME.properties


mInstanceGenerator

protected InstanceGenerator mInstanceGenerator
The instance generator we're using, all loaded up and ready to go with the appropriate dataset

Constructor Detail

ExperimentConstructor

public ExperimentConstructor()
Method Detail

main

public static void main(java.lang.String[] args)
Main method that can either take stuff on the command line to build a single experiment, or points to an ExperimentBatch XML file. You can specify all the options that are in an XML file by using the same XML tag name preceeded with two dashes


generateBatches

public static void generateBatches(java.lang.String xmlFile)

buildSingle

public static void buildSingle(java.lang.String builderClassName,
                               Experiment exp,
                               java.util.List<java.lang.String> args)

getWrapperPropString

protected java.lang.String getWrapperPropString()
Useful for subclasses so that they can get some of the handy properties that they'll need to pass to their wrappers


prepareExperiment

public abstract void prepareExperiment(java.lang.String path)
Subclasses must provide this method which is responsible for


processArg

public void processArg(java.lang.String arg,
                       java.util.Queue<java.lang.String> args)
Process a constructor argument, and suck out stuff from the arg queue


getType

protected abstract java.lang.String getType()
Get a string indicating the type of this Experiment (namely the name of the SMBO method)


getTrajectoryParserClassName

protected abstract java.lang.String getTrajectoryParserClassName()
Gets the name of the class that is used to parse the results of the SMBO method into a Trajectory


getCallString

protected abstract java.util.List<java.lang.String> getCallString(java.lang.String experimentPath)
Gets the set of strings that are called on the command line to invoke the SMBO method


getEnvVariables

protected java.util.List<java.lang.String> getEnvVariables()
Gets a list of all the environment variables that need to be set for this experiment to run


getPrefix

public java.lang.String getPrefix(java.lang.String classifierName)
Gets a prefix out of the classifier name by stripping all the packages and capital letters - needed to ensure that parameters with the same WEKA name don't collide.


generateAlgorithmParameterConditionalGroupForDAG

public ParameterConditionalGroup generateAlgorithmParameterConditionalGroupForDAG()
Populates a ParameterConditionalGroup with all the params/conditionals that are needed for optimization methods that support a DAG structure