Class AbstractExperiment.AbstractExperimentJob<T extends AbstractExperiment>

    • Field Detail

      • m_Run

        protected int m_Run
        the run.
      • m_Classifier

        protected weka.classifiers.Classifier m_Classifier
        the classifier.
      • m_Data

        protected weka.core.Instances m_Data
        the dataset.
      • m_ClassLabelIndex

        protected Index m_ClassLabelIndex
        the class label index.
      • m_Results

        protected SpreadSheet m_Results
        the generated results.
    • Constructor Detail

      • AbstractExperimentJob

        public AbstractExperimentJob​(T owner,
                                     int run,
                                     weka.classifiers.Classifier classifier,
                                     weka.core.Instances data)
        Initializes the run.
        Parameters:
        owner - the owning experiment
        run - the current run
        classifier - the classifier to evaluate
        data - the data to use for evaluation
    • Method Detail

      • addMetric

        protected void addMetric​(SpreadSheet results,
                                 String name,
                                 Object value)
        Adds the metric to the results, automatically expands spreadsheet.
        Parameters:
        results - the results to add the metrics to
        name - the name
        value - the value
      • addMetrics

        protected void addMetrics​(SpreadSheet results,
                                  int currentRun,
                                  weka.classifiers.Classifier cls,
                                  weka.core.Instances data,
                                  weka.classifiers.Evaluation eval)
        Adds the metrics from the Evaluation object to the results.
        Parameters:
        results - the results to add the metrics to
        currentRun - the current run
        cls - the classifier to evaluate
        data - the dataset to evaluate on
        eval - the Evaluation object to add
      • preProcessCheck

        protected String preProcessCheck()
        Checks whether all pre-conditions have been met.
        Specified by:
        preProcessCheck in class AbstractJob
        Returns:
        null if everything is OK, otherwise an error message
      • evaluate

        protected abstract void evaluate()
        Performs the evaluation.
      • process

        protected void process()
                        throws Exception
        Does the actual execution of the job.
        Specified by:
        process in class AbstractJob
        Throws:
        Exception - if fails to execute job
      • postProcessCheck

        protected String postProcessCheck()
        Checks whether all post-conditions have been met.
        Specified by:
        postProcessCheck in class AbstractJob
        Returns:
        null if everything is OK, otherwise an error message
      • toString

        public String toString()
        Returns a string representation of this job.
        Specified by:
        toString in class AbstractJob
        Returns:
        the job as string