Class AbstractExperimentSetup
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation<ExperimentTab,ResultItem>
-
- adams.gui.tools.wekainvestigator.tab.experimenttab.setup.AbstractExperimentSetup
-
- All Implemented Interfaces:
GlobalInfoSupporter
,LoggingSupporter
,SizeOfHandler
,StatusMessageHandler
,Stoppable
,StoppableWithFeedback
,Serializable
- Direct Known Subclasses:
CrossValidationSetup
,TrainTestSplitSetup
public abstract class AbstractExperimentSetup extends AbstractEvaluation<ExperimentTab,ResultItem> implements StoppableWithFeedback
Ancestor for experiment setups.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Stopped
whether the experiment got stopped.-
Fields inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
m_Owner, m_PanelOptions
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractExperimentSetup()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
canExecute(weka.classifiers.Classifier classifier)
Tests whether the experiment setup can be executed for the classifier.protected abstract void
doExecute(weka.classifiers.Classifier classifier, ResultItem item)
Executes the experiment setup for the classifier and updates the result item.void
execute(weka.classifiers.Classifier classifier, ResultItem item)
Executes the experiment setup for the classifier and updates the result item.static Class[]
getSetups()
Returns the available actions.abstract ResultItem
init(weka.classifiers.Classifier classifier)
Initializes the result item.boolean
isStopped()
Whether the execution has been stopped.protected abstract void
postExecute(weka.classifiers.Classifier classifier, ResultItem item)
Hook method for after executing the experiment, e.g., cleaning up temp files.void
stopExecution()
Stops the execution.-
Methods inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
activate, addObjectSize, addToHistory, deserialize, getName, getOwner, getPanel, getProperties, getTestingUpdateInterval, initGUI, initialize, isValidDataIndex, listOrArray, serialize, setOwner, showStatus, toString, update
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.GlobalInfoSupporter
globalInfo
-
-
-
-
Method Detail
-
canExecute
public abstract String canExecute(weka.classifiers.Classifier classifier)
Tests whether the experiment setup can be executed for the classifier.- Parameters:
classifier
- the classifier to check- Returns:
- null if successful, otherwise error message
-
init
public abstract ResultItem init(weka.classifiers.Classifier classifier) throws Exception
Initializes the result item.- Parameters:
classifier
- the current classifier- Returns:
- the initialized history item
- Throws:
Exception
- if initialization fails
-
doExecute
protected abstract void doExecute(weka.classifiers.Classifier classifier, ResultItem item) throws Exception
Executes the experiment setup for the classifier and updates the result item.- Parameters:
classifier
- the current classifieritem
- the item to update- Throws:
Exception
- if evaluation fails
-
postExecute
protected abstract void postExecute(weka.classifiers.Classifier classifier, ResultItem item)
Hook method for after executing the experiment, e.g., cleaning up temp files.- Parameters:
classifier
- the current classifieritem
- the item to update
-
execute
public void execute(weka.classifiers.Classifier classifier, ResultItem item) throws Exception
Executes the experiment setup for the classifier and updates the result item.- Parameters:
classifier
- the current classifieritem
- the item to update- Throws:
Exception
- if evaluation fails
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecution
in interfaceStoppable
-
isStopped
public boolean isStopped()
Whether the execution has been stopped.- Specified by:
isStopped
in interfaceStoppableWithFeedback
- Returns:
- true if stopped
-
getSetups
public static Class[] getSetups()
Returns the available actions.- Returns:
- the action classnames
-
-