|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.experiment.Experiment
Holds all the necessary configuration information for a standard type experiment. This object is able to be serialized for storage on disk.
Field Summary | |
static java.lang.String |
FILE_EXTENSION
The filename extension that should be used for experiment files |
Constructor Summary | |
Experiment()
|
Method Summary | |
void |
advanceCounters()
Increments iteration counters appropriately. |
void |
classFirst(boolean flag)
Sets whether the first attribute is treated as the class for all datasets involved in the experiment. |
boolean |
getAdvanceDataSetFirst()
Get the value of m_DataSetFirstFirst. |
int |
getCurrentDatasetNumber()
When an experiment is running, this returns the current dataset number. |
int |
getCurrentPropertyNumber()
When an experiment is running, this returns the index of the current custom property value. |
int |
getCurrentRunNumber()
When an experiment is running, this returns the current run number. |
javax.swing.DefaultListModel |
getDatasets()
Gets the datasets in the experiment. |
java.lang.String |
getNotes()
Get the user notes. |
java.lang.String[] |
getOptions()
Gets the current settings of the experiment iterator. |
java.lang.Object |
getPropertyArray()
Gets the array of values to set the custom property to. |
int |
getPropertyArrayLength()
Gets the number of custom iterator values that have been defined for the experiment. |
java.lang.Object |
getPropertyArrayValue(int index)
Gets a specified value from the custom property iterator array. |
PropertyNode[] |
getPropertyPath()
Gets the path of properties taken to get to the custom property to iterate over. |
ResultListener |
getResultListener()
Gets the result listener where results will be sent. |
ResultProducer |
getResultProducer()
Get the result producer used for the current experiment. |
int |
getRunLower()
Get the lower run number for the experiment. |
int |
getRunUpper()
Get the upper run number for the experiment. |
boolean |
getUsePropertyIterator()
Gets whether the custom property iterator should be used. |
boolean |
hasMoreIterations()
Returns true if there are more iterations to carry out in the experiment. |
void |
initialize()
Prepares an experiment for running, initializing current iterator settings. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.. |
static void |
main(java.lang.String[] args)
Configures/Runs the Experiment from the command line. |
void |
nextIteration()
Carries out the next iteration of the experiment. |
void |
postProcess()
Signals that the experiment is finished running, so that cleanup can be done. |
void |
runExperiment()
Runs all iterations of the experiment, continuing past errors. |
void |
setAdvanceDataSetFirst(boolean newAdvanceDataSetFirst)
Set the value of m_AdvanceDataSetFirst. |
void |
setDatasets(javax.swing.DefaultListModel ds)
Set the datasets to use in the experiment |
void |
setNotes(java.lang.String newNotes)
Set the user notes. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setPropertyArray(java.lang.Object newPropArray)
Sets the array of values to set the custom property to. |
void |
setPropertyPath(PropertyNode[] newPropertyPath)
Sets the path of properties taken to get to the custom property to iterate over. |
void |
setResultListener(ResultListener newResultListener)
Sets the result listener where results will be sent. |
void |
setResultProducer(ResultProducer newResultProducer)
Set the result producer used for the current experiment. |
void |
setRunLower(int newRunLower)
Set the lower run number for the experiment. |
void |
setRunUpper(int newRunUpper)
Set the upper run number for the experiment. |
void |
setUsePropertyIterator(boolean newUsePropertyIterator)
Sets whether the custom property iterator should be used. |
java.lang.String |
toString()
Gets a string representation of the experiment configuration. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static java.lang.String FILE_EXTENSION
Constructor Detail |
public Experiment()
Method Detail |
public void classFirst(boolean flag)
public boolean getAdvanceDataSetFirst()
public void setAdvanceDataSetFirst(boolean newAdvanceDataSetFirst)
public boolean getUsePropertyIterator()
public void setUsePropertyIterator(boolean newUsePropertyIterator)
newUsePropertyIterator
- true if sopublic PropertyNode[] getPropertyPath()
public void setPropertyPath(PropertyNode[] newPropertyPath)
newPropertyPath
- an array of PropertyNodespublic void setPropertyArray(java.lang.Object newPropArray)
newPropArray
- a value of type Object which should be an
array of the appropriate values.public java.lang.Object getPropertyArray()
public int getPropertyArrayLength()
public java.lang.Object getPropertyArrayValue(int index)
index
- the index of the value wanted
public int getCurrentRunNumber()
public int getCurrentDatasetNumber()
public int getCurrentPropertyNumber()
public void initialize() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic boolean hasMoreIterations()
public void nextIteration() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic void advanceCounters()
public void runExperiment()
public void postProcess() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic javax.swing.DefaultListModel getDatasets()
public void setDatasets(javax.swing.DefaultListModel ds)
ds
- the list of datasets to usepublic ResultListener getResultListener()
public void setResultListener(ResultListener newResultListener)
newResultListener
- the result listener where results will be sent.public ResultProducer getResultProducer()
public void setResultProducer(ResultProducer newResultProducer)
newResultProducer
- result producer to use for the current
experiment.public int getRunUpper()
public void setRunUpper(int newRunUpper)
newRunUpper
- the upper run number for the experiment.public int getRunLower()
public void setRunLower(int newRunLower)
newRunLower
- the lower run number for the experiment.public java.lang.String getNotes()
public void setNotes(java.lang.String newNotes)
newNotes
- New user notes.public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-L num
The lower run number to start the experiment from.
(default 1)
-U num
The upper run number to end the experiment at (inclusive).
(default 10)
-T arff_file
The dataset to run the experiment on.
(required, may be specified multiple times)
-P class_name
The full class name of a ResultProducer (required).
eg: weka.experiment.RandomSplitResultProducer
-D "class_name"
The full class name of a ResultListener followed by any options.
If options are supplied then full string must be enclosed in quotes.
(required).
eg: "weka.experiment.CSVResultListener -O outfile.csv"
All option after -- will be passed to the result producer.
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- command line arguments to the Experiment.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London