Class AbstractCrossvalidatedInstanceEvaluator<T extends AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer>

    • Field Detail

      • m_Folds

        protected int m_Folds
        the number of folds for cross-validation.
      • m_Seed

        protected int m_Seed
        the random seed for cross-valiation.
    • Constructor Detail

      • AbstractCrossvalidatedInstanceEvaluator

        public AbstractCrossvalidatedInstanceEvaluator()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractDatasetInstanceEvaluator
      • setFolds

        public void setFolds​(int value)
        Sets the number of folds for cross-validation.
        Parameters:
        value - the number of folds (<2 turns off cross-validation)
      • getFolds

        public int getFolds()
        Returns the number of folds for cross-validation.
        Returns:
        the number of folds (<2 turns off cross-validation)
      • foldsTipText

        public String foldsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSeed

        public void setSeed​(int value)
        Sets the seed value for cross-validation.
        Parameters:
        value - the seed
      • getSeed

        public int getSeed()
        Returns the seed value for cross-validation.
        Returns:
        the seed
      • seedTipText

        public String seedTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • findThreshold

        protected abstract String findThreshold​(Vector<T> evals)
        Finds the threshold based on the collected data.
        Parameters:
        evals - the collected evaluation containers
        Returns:
        null if everything OK, error message otherwise
      • evaluate

        protected abstract Vector<T> evaluate​(weka.core.Instances train,
                                              weka.core.Instances test)
        Performs an evaluation on the given train and test set.
        Parameters:
        train - the training set
        test - the test set
        Returns:
        the generated evaluation container
      • findThreshold

        protected String findThreshold()
        Finds the user-defined threshold and sets other internal variables accordingly.
        Specified by:
        findThreshold in class AbstractDatasetInstanceEvaluator
        Returns:
        null if everything OK, error message otherwise