类 RemoteExperiment
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
This class is experimental at present. Has been tested using CSVResultListener (sending results to standard out) and DatabaseResultListener (InstantDB + RmiJdbc bridge).
Getting started:
Start InstantDB (with the RMI bridge) on some machine. If using java2
then specify -Djava.security.policy=db.policy to the
virtual machine. Where db.policy is as follows:
grant { permission java.security.AllPermission; };
Start RemoteEngine servers on x machines as per the instructons in the README_Experiment_Gui file. There must be a DatabaseUtils.props in either the HOME or current directory of each machine, listing all necessary jdbc drivers.
The machine where a RemoteExperiment is started must also have a copy of DatabaseUtils.props listing the URL to the machine where the database server is running (RmiJdbc + InstantDB).
Here is an example of starting a RemoteExperiment:
java -Djava.rmi.server.codebase=file:/path to weka classes/ \ weka.experiment.RemoteExperiment -L 1 -U 10 \ -T /home/ml/datasets/UCI/iris.arff \ -D "weka.experiment.DatabaseResultListener" \ -P "weka.experiment.RandomSplitResultProducer" \ -h rosebud.cs.waikato.ac.nz -h blackbird.cs.waikato.ac.nz -r -- \ -W weka.experiment.ClassifierSplitEvaluator -- \ -W weka.classifiers.bayes.NaiveBayes
The "codebase" property tells rmi where to serve up weka classes from. This can either be a file url (as long as a shared file system is being used that is accessable by the remoteEngine servers), or http url (which of course supposes that a web server is running and you have put your weka classes somewhere that is web accessable). If using a file url the trailing "/" is *most* important unless the weka classes are in a jar file.
Valid options are:
-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 (required). eg: weka.experiment.CSVResultListener
-N <string> A string containing any notes about the experiment. (default none)
Options specific to result producer weka.experiment.RandomSplitResultProducer:
-P <percent> The percentage of instances to use for training. (default 66)
-D Save raw split evaluator output.
-O <file/directory name/path> The filename where raw output will be stored. If a directory name is specified then then individual outputs will be gzipped, otherwise all output will be zipped to the named file. Use in conjuction with -D. (default splitEvalutorOut.zip)
-W <class name> The full class name of a SplitEvaluator. eg: weka.experiment.ClassifierSplitEvaluator
-R Set when data is not to be randomized and the data sets' size. Is not to be determined via probabilistic rounding.
Options specific to split evaluator weka.experiment.ClassifierSplitEvaluator:
-W <class name> The full class name of the classifier. eg: weka.classifiers.bayes.NaiveBayes
-C <index> The index of the class for which IR statistics are to be output. (default 1)
-I <index> The index of an attribute to output in the results. This attribute should identify an instance in order to know which instances are in the test set of a cross validation. if 0 no output (default 0).
-P Add target and prediction columns to the result for each fold.
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
- 版本:
- $Revision: 1.16 $
- 作者:
- Mark Hall (mhall@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
从类继承的字段 weka.experiment.Experiment
FILE_EXTENSION
-
构造器概要
构造器构造器说明Construct a new RemoteExperiment using an empty Experiment as base ExperimentRemoteExperiment
(Experiment base) Construct a new RemoteExperiment using a base Experiment -
方法概要
修饰符和类型方法说明void
Set the abort flagvoid
Add an object to the list of those interested in recieving update information from the RemoteExperimentvoid
addRemoteHost
(String hostname) Add a host name to the list of remote hostsvoid
overides the one in ExperimentGet the base experiment used by this remote experimentGet the list of remote host namesReturns the revision string.boolean
Returns true if sub experiments are to be created on the basis of data set..void
Prepares a remote experiment for running, creates sub experimentsvoid
launchNext
(int wexp, int ah) Launch a sub experiment on a remote hoststatic void
Configures/Runs the Experiment from the command line.void
Overides the one in Experimentvoid
overides the one in Experimentvoid
Overides runExperiment in Experimentvoid
setBaseExperiment
(Experiment base) Set the base experiment.void
Set the datasets to use in the experimentvoid
Set the user notes.void
setPropertyArray
(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
Set the list of remote host namesvoid
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
setSplitByDataSet
(boolean sd) Set whether sub experiments are to be created on the basis of data set.void
setUsePropertyIterator
(boolean newUsePropertyIterator) Sets whether the custom property iterator should be used.toString()
Overides toString in Experiment从类继承的方法 weka.experiment.Experiment
classFirst, getAdvanceDataSetFirst, getCurrentDatasetNumber, getCurrentPropertyNumber, getCurrentRunNumber, getDatasets, getNotes, getOptions, getPropertyArray, getPropertyArrayLength, getPropertyArrayValue, getPropertyPath, getResultListener, getResultProducer, getRunLower, getRunUpper, getUsePropertyIterator, hasMoreIterations, listOptions, read, setAdvanceDataSetFirst, setOptions, write
-
构造器详细资料
-
RemoteExperiment
Construct a new RemoteExperiment using an empty Experiment as base Experiment- 抛出:
Exception
- if the base experiment is null
-
RemoteExperiment
Construct a new RemoteExperiment using a base Experiment- 参数:
base
- the base experiment to use- 抛出:
Exception
- if the base experiment is null
-
-
方法详细资料
-
getSplitByDataSet
public boolean getSplitByDataSet()Returns true if sub experiments are to be created on the basis of data set..- 返回:
- a
boolean
value indicating whether sub experiments are to be created on the basis of data set (true) or run number (false).
-
setSplitByDataSet
public void setSplitByDataSet(boolean sd) Set whether sub experiments are to be created on the basis of data set.- 参数:
sd
- true if sub experiments are to be created on the basis of data set. Otherwise sub experiments are created on the basis of run number.
-
addRemoteExperimentListener
Add an object to the list of those interested in recieving update information from the RemoteExperiment- 参数:
r
- a listener
-
getBaseExperiment
Get the base experiment used by this remote experiment- 返回:
- the base experiment
-
setBaseExperiment
Set the base experiment. A sub experiment will be created for each run in the base experiment.- 参数:
base
- the base experiment to use.- 抛出:
Exception
- if supplied base experiment is null
-
setNotes
Set the user notes.- 覆盖:
setNotes
在类中Experiment
- 参数:
newNotes
- New user notes.
-
setRunLower
public void setRunLower(int newRunLower) Set the lower run number for the experiment.- 覆盖:
setRunLower
在类中Experiment
- 参数:
newRunLower
- the lower run number for the experiment.
-
setRunUpper
public void setRunUpper(int newRunUpper) Set the upper run number for the experiment.- 覆盖:
setRunUpper
在类中Experiment
- 参数:
newRunUpper
- the upper run number for the experiment.
-
setResultListener
Sets the result listener where results will be sent.- 覆盖:
setResultListener
在类中Experiment
- 参数:
newResultListener
- the result listener where results will be sent.
-
setResultProducer
Set the result producer used for the current experiment.- 覆盖:
setResultProducer
在类中Experiment
- 参数:
newResultProducer
- result producer to use for the current experiment.
-
setDatasets
Set the datasets to use in the experiment- 覆盖:
setDatasets
在类中Experiment
- 参数:
ds
- the list of datasets to use
-
setUsePropertyIterator
public void setUsePropertyIterator(boolean newUsePropertyIterator) Sets whether the custom property iterator should be used.- 覆盖:
setUsePropertyIterator
在类中Experiment
- 参数:
newUsePropertyIterator
- true if so
-
setPropertyPath
Sets the path of properties taken to get to the custom property to iterate over.- 覆盖:
setPropertyPath
在类中Experiment
- 参数:
newPropertyPath
- an array of PropertyNodes
-
setPropertyArray
Sets the array of values to set the custom property to.- 覆盖:
setPropertyArray
在类中Experiment
- 参数:
newPropArray
- a value of type Object which should be an array of the appropriate values.
-
initialize
Prepares a remote experiment for running, creates sub experiments- 覆盖:
initialize
在类中Experiment
- 抛出:
Exception
- if an error occurs
-
abortExperiment
public void abortExperiment()Set the abort flag -
launchNext
public void launchNext(int wexp, int ah) Launch a sub experiment on a remote host- 参数:
wexp
- the index of the sub experiment to launchah
- the index of the available host to launch on
-
nextIteration
Overides the one in Experiment- 覆盖:
nextIteration
在类中Experiment
- 抛出:
Exception
- never throws an exception
-
advanceCounters
public void advanceCounters()overides the one in Experiment- 覆盖:
advanceCounters
在类中Experiment
-
postProcess
public void postProcess()overides the one in Experiment- 覆盖:
postProcess
在类中Experiment
-
addRemoteHost
Add a host name to the list of remote hosts- 参数:
hostname
- the host name to add to the list
-
getRemoteHosts
Get the list of remote host names- 返回:
- the list of remote host names
-
setRemoteHosts
Set the list of remote host names- 参数:
list
- the list of remote host names
-
toString
Overides toString in Experiment- 覆盖:
toString
在类中Experiment
- 返回:
- a description of this remote experiment
-
runExperiment
public void runExperiment()Overides runExperiment in Experiment- 覆盖:
runExperiment
在类中Experiment
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Experiment
- 返回:
- the revision
-
main
Configures/Runs the Experiment from the command line.- 参数:
args
- command line arguments to the Experiment.
-