Class AbstractExperimentSetup

    • Field Detail

      • m_Stopped

        protected boolean m_Stopped
        whether the experiment got stopped.
    • Constructor Detail

      • AbstractExperimentSetup

        public AbstractExperimentSetup()
    • 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 classifier
        item - 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 classifier
        item - 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 classifier
        item - the item to update
        Throws:
        Exception - if evaluation fails
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface Stoppable
      • isStopped

        public boolean isStopped()
        Whether the execution has been stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        Returns:
        true if stopped
      • getSetups

        public static Class[] getSetups()
        Returns the available actions.
        Returns:
        the action classnames