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, removeLogListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLogListener, log, removeLogListener
protected 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 Experiment
value
- the notespublic String getNotes()
getNotes
in interface Experiment
public String notesTipText()
public void setClassifiers(MultiLabelClassifier[] value)
setClassifiers
in interface Experiment
value
- the classifierspublic MultiLabelClassifier[] getClassifiers()
getClassifiers
in interface Experiment
public String classifiersTipText()
classifiersTipText
in interface Experiment
protected DatasetProvider getDefaultDatasetProvider()
public void setDatasetProvider(DatasetProvider value)
setDatasetProvider
in interface Experiment
value
- the providerpublic DatasetProvider getDatasetProvider()
getDatasetProvider
in interface Experiment
public String datasetProviderTipText()
datasetProviderTipText
in interface Experiment
protected Evaluator getDefaultEvaluator()
public void setEvaluator(Evaluator value)
setEvaluator
in interface Experiment
value
- the evaluatorpublic Evaluator getEvaluator()
getEvaluator
in interface Experiment
public String evaluatorTipText()
evaluatorTipText
in interface Experiment
public void setStatisticsHandler(EvaluationStatisticsHandler value)
setStatisticsHandler
in interface Experiment
value
- the handlerprotected EvaluationStatisticsHandler getDefaultStatisticsHandler()
public EvaluationStatisticsHandler getStatisticsHandler()
getStatisticsHandler
in interface Experiment
public String statisticsHandlerTipText()
statisticsHandlerTipText
in interface Experiment
public void addExecutionStageListener(ExecutionStageListener l)
addExecutionStageListener
in interface Experiment
l
- the listener to addpublic void removeExecutionStageListener(ExecutionStageListener l)
removeExecutionStageListener
in interface Experiment
l
- the listener to removeprotected void notifyExecutionStageListeners(ExecutionStageEvent.Stage stage)
stage
- the new stagepublic void addIterationNotificationListener(IterationNotificationListener l)
addIterationNotificationListener
in interface Experiment
l
- the listener to addpublic void removeIterationNotificationListener(IterationNotificationListener l)
removeIterationNotificationListener
in interface Experiment
l
- the listener to removeprotected void notifyIterationNotificationListeners(MultiLabelClassifier classifier, weka.core.Instances dataset)
classifier
- the classifierdataset
- the datasetpublic void addStatisticsNotificationListener(StatisticsNotificationListener l)
addStatisticsNotificationListener
in interface Experiment
l
- the listener to addpublic void removeStatisticsNotificationListener(StatisticsNotificationListener l)
removeStatisticsNotificationListener
in interface Experiment
l
- the listener to removeprotected void notifyStatisticsNotificationListeners(List<EvaluationStatistics> stats)
stats
- the statisticspublic Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
public void setOptions(String[] options) throws Exception
setOptions
in interface weka.core.OptionHandler
options
- the optionsException
- if parsing failspublic String[] getOptions()
getOptions
in interface weka.core.OptionHandler
protected String handleError(Object source, String msg)
source
- the sourcemsg
- the error message, can be nullpublic String initialize()
initialize
in interface Experiment
public boolean isInitializing()
isInitializing
in interface Experiment
public String run()
run
in interface Experiment
public boolean isRunning()
isRunning
in interface Experiment
public void stop()
stop
in interface Experiment
public boolean isStopping()
isStopping
in interface Experiment
public String finish()
finish
in interface Experiment
public List<EvaluationStatistics> getStatistics()
getStatistics
in interface Experiment
Copyright © 2017. All Rights Reserved.