public class DefaultExperiment extends LogObject implements Experiment
| Modifier and Type | Field and Description |
|---|---|
protected MultiLabelClassifier[] |
m_Classifiers
the classifiers to evaluate.
|
protected DatasetProvider |
m_DatasetProvider
the dataset provider.
|
protected Evaluator |
m_Evaluator
the evaluator.
|
protected HashSet<ExecutionStageListener> |
m_ExecutionStageListeners
the listeners for execution stages.
|
protected boolean |
m_Initializing
whether the experiment is initializing.
|
protected HashSet<IterationNotificationListener> |
m_IterationNotficationListeners
the listeners for iterations.
|
protected String |
m_Notes
the notes.
|
protected boolean |
m_Running
whether the experiment is running.
|
protected List<EvaluationStatistics> |
m_Statistics
the collected statistics.
|
protected EvaluationStatisticsHandler |
m_StatisticsHandler
the statistics handler.
|
protected HashSet<StatisticsNotificationListener> |
m_StatisticsNotificationListeners
the listeners for statistics.
|
protected boolean |
m_Stopping
whether the experiment is stopping.
|
m_Debug, m_LogListeners| Constructor and Description |
|---|
DefaultExperiment() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutionStageListener(ExecutionStageListener l)
Adds the execution stage listener.
|
void |
addIterationNotificationListener(IterationNotificationListener l)
Adds the iteration listener.
|
void |
addStatisticsNotificationListener(StatisticsNotificationListener l)
Adds the statistics listener.
|
String |
classifiersTipText()
Describes this property.
|
String |
datasetProviderTipText()
Describes this property.
|
String |
evaluatorTipText()
Describes this property.
|
String |
finish()
Finishes the experiment.
|
MultiLabelClassifier[] |
getClassifiers()
Returns the classifiers to be evaluated.
|
DatasetProvider |
getDatasetProvider()
Returns the dataset provider in use.
|
protected DatasetProvider |
getDefaultDatasetProvider()
Returns the default dataset provider.
|
protected Evaluator |
getDefaultEvaluator()
Returns the default evaluator to use.
|
protected EvaluationStatisticsHandler |
getDefaultStatisticsHandler()
Returns the default statistics handler.
|
Evaluator |
getEvaluator()
Returns the evaluator in use.
|
String |
getNotes()
Returns the notes.
|
String[] |
getOptions()
Returns the options.
|
List<EvaluationStatistics> |
getStatistics()
Returns the current statistics.
|
EvaluationStatisticsHandler |
getStatisticsHandler()
Returns the statistics handler.
|
protected String |
handleError(Object source,
String msg)
Adds the source's class name to the message if not null.
|
String |
initialize()
Initializes the experiment.
|
boolean |
isInitializing()
Returns whether the experiment is initializing.
|
boolean |
isRunning()
Returns whether the experiment is running.
|
boolean |
isStopping()
Returns whether the experiment is stopping.
|
Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration of all the available options..
|
String |
notesTipText()
Describes this property.
|
protected void |
notifyExecutionStageListeners(ExecutionStageEvent.Stage stage)
Notifies all listeners of a new execution stage.
|
protected void |
notifyIterationNotificationListeners(MultiLabelClassifier classifier,
weka.core.Instances dataset)
Notifies all listeners of a new classifier/dataset combination.
|
protected void |
notifyStatisticsNotificationListeners(List<EvaluationStatistics> stats)
Notifies all listeners of a new classifier/dataset combination.
|
void |
removeExecutionStageListener(ExecutionStageListener l)
Removes the execution stage listener.
|
void |
removeIterationNotificationListener(IterationNotificationListener l)
Removes the iteration listener.
|
void |
removeStatisticsNotificationListener(StatisticsNotificationListener l)
Removes the statistics listener.
|
String |
run()
Runs the experiment.
|
void |
setClassifiers(MultiLabelClassifier[] value)
Sets the classifiers to be evaluated.
|
void |
setDatasetProvider(DatasetProvider value)
Sets the dataset provider to use.
|
void |
setEvaluator(Evaluator value)
Sets the evaluator to use.
|
void |
setNotes(String value)
Sets the notes.
|
void |
setOptions(String[] options)
Sets the options.
|
void |
setStatisticsHandler(EvaluationStatisticsHandler value)
Sets the statistics handler.
|
String |
statisticsHandlerTipText()
Describes this property.
|
void |
stop()
Stops the experiment if running.
|
addLogListener, debug, getLogListeners, handleException, log, removeLogListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLogListener, log, removeLogListenerprotected String m_Notes
protected MultiLabelClassifier[] m_Classifiers
protected DatasetProvider m_DatasetProvider
protected Evaluator m_Evaluator
protected EvaluationStatisticsHandler m_StatisticsHandler
protected boolean m_Initializing
protected boolean m_Running
protected boolean m_Stopping
protected transient HashSet<ExecutionStageListener> m_ExecutionStageListeners
protected transient HashSet<IterationNotificationListener> m_IterationNotficationListeners
protected transient HashSet<StatisticsNotificationListener> m_StatisticsNotificationListeners
protected List<EvaluationStatistics> m_Statistics
public void setNotes(String value)
setNotes in interface Experimentvalue - the notespublic String getNotes()
getNotes in interface Experimentpublic String notesTipText()
public void setClassifiers(MultiLabelClassifier[] value)
setClassifiers in interface Experimentvalue - the classifierspublic MultiLabelClassifier[] getClassifiers()
getClassifiers in interface Experimentpublic String classifiersTipText()
classifiersTipText in interface Experimentprotected DatasetProvider getDefaultDatasetProvider()
public void setDatasetProvider(DatasetProvider value)
setDatasetProvider in interface Experimentvalue - the providerpublic DatasetProvider getDatasetProvider()
getDatasetProvider in interface Experimentpublic String datasetProviderTipText()
datasetProviderTipText in interface Experimentprotected Evaluator getDefaultEvaluator()
public void setEvaluator(Evaluator value)
setEvaluator in interface Experimentvalue - the evaluatorpublic Evaluator getEvaluator()
getEvaluator in interface Experimentpublic String evaluatorTipText()
evaluatorTipText in interface Experimentpublic void setStatisticsHandler(EvaluationStatisticsHandler value)
setStatisticsHandler in interface Experimentvalue - the handlerprotected EvaluationStatisticsHandler getDefaultStatisticsHandler()
public EvaluationStatisticsHandler getStatisticsHandler()
getStatisticsHandler in interface Experimentpublic String statisticsHandlerTipText()
statisticsHandlerTipText in interface Experimentpublic void addExecutionStageListener(ExecutionStageListener l)
addExecutionStageListener in interface Experimentl - the listener to addpublic void removeExecutionStageListener(ExecutionStageListener l)
removeExecutionStageListener in interface Experimentl - the listener to removeprotected void notifyExecutionStageListeners(ExecutionStageEvent.Stage stage)
stage - the new stagepublic void addIterationNotificationListener(IterationNotificationListener l)
addIterationNotificationListener in interface Experimentl - the listener to addpublic void removeIterationNotificationListener(IterationNotificationListener l)
removeIterationNotificationListener in interface Experimentl - the listener to removeprotected void notifyIterationNotificationListeners(MultiLabelClassifier classifier, weka.core.Instances dataset)
classifier - the classifierdataset - the datasetpublic void addStatisticsNotificationListener(StatisticsNotificationListener l)
addStatisticsNotificationListener in interface Experimentl - the listener to addpublic void removeStatisticsNotificationListener(StatisticsNotificationListener l)
removeStatisticsNotificationListener in interface Experimentl - the listener to removeprotected void notifyStatisticsNotificationListeners(List<EvaluationStatistics> stats)
stats - the statisticspublic Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerpublic void setOptions(String[] options) throws Exception
setOptions in interface weka.core.OptionHandleroptions - the optionsException - if parsing failspublic String[] getOptions()
getOptions in interface weka.core.OptionHandlerprotected String handleError(Object source, String msg)
source - the sourcemsg - the error message, can be nullpublic String initialize()
initialize in interface Experimentpublic boolean isInitializing()
isInitializing in interface Experimentpublic String run()
run in interface Experimentpublic boolean isRunning()
isRunning in interface Experimentpublic void stop()
stop in interface Experimentpublic boolean isStopping()
isStopping in interface Experimentpublic String finish()
finish in interface Experimentpublic List<EvaluationStatistics> getStatistics()
getStatistics in interface ExperimentCopyright © 2017. All Rights Reserved.