Class InstancesGroupedCrossValidationFoldGenerator

    • Field Detail

      • m_NumFolds

        protected int m_NumFolds
        the number of folds.
      • m_Randomize

        protected boolean m_Randomize
        whether to randomize the data.
      • m_Seed

        protected long m_Seed
        the seed value.
      • m_Stratify

        protected boolean m_Stratify
        whether to stratify the data (in case of nominal class).
      • m_RegExp

        protected BaseRegExp m_RegExp
        the regular expression for the nominal/string attribute.
      • m_Group

        protected String m_Group
        the group expression.
    • Constructor Detail

      • InstancesGroupedCrossValidationFoldGenerator

        public InstancesGroupedCrossValidationFoldGenerator()
    • Method Detail

      • setNumFolds

        public void setNumFolds​(int value)
        Sets the number of folds to use.
        Parameters:
        value - the number of folds, less than 2 for LOO
      • getNumFolds

        public int getNumFolds()
        Returns the number of folds.
        Returns:
        the number of folds
      • numFoldsTipText

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

        public void setRandomize​(boolean value)
        Sets whether to randomize the data.
        Specified by:
        setRandomize in interface OptionalRandomizable
        Parameters:
        value - true if to randomize the data
      • getRandomize

        public boolean getRandomize()
        Returns whether to randomize the data.
        Specified by:
        getRandomize in interface OptionalRandomizable
        Returns:
        true if to randomize the data
      • randomizeTipText

        public String randomizeTipText()
        Returns the tip text for this property.
        Specified by:
        randomizeTipText in interface OptionalRandomizable
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSeed

        public void setSeed​(long value)
        Sets the seed value.
        Specified by:
        setSeed in interface Randomizable
        Parameters:
        value - the seed
      • getSeed

        public long getSeed()
        Returns the seed value.
        Specified by:
        getSeed in interface Randomizable
        Returns:
        the seed
      • seedTipText

        public String seedTipText()
        Returns the tip text for this property.
        Specified by:
        seedTipText in interface Randomizable
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setStratify

        public void setStratify​(boolean value)
        Sets whether to stratify the data (nominal class).
        Parameters:
        value - whether to stratify the data (nominal class)
      • getStratify

        public boolean getStratify()
        Returns whether to stratify the data (in case of nominal class).
        Returns:
        true if to stratify
      • stratifyTipText

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

        public void setIndex​(WekaAttributeIndex value)
        Sets the attribute index to use for grouping.
        Parameters:
        value - the index
      • getIndex

        public WekaAttributeIndex getIndex()
        Returns the attribute index to use for grouping.
        Returns:
        the index
      • indexTipText

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

        public void setRegExp​(BaseRegExp value)
        Sets the regular expression for identifying the group (eg '^(.*)-([0-9]+)-(.*)$').
        Parameters:
        value - the expression
      • getRegExp

        public BaseRegExp getRegExp()
        Returns the regular expression for identifying the group (eg '^(.*)-([0-9]+)-(.*)$').
        Returns:
        the expression
      • regExpTipText

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

        public void setGroup​(String value)
        Sets the replacement string to use as group (eg '$2').
        Parameters:
        value - the group
      • getGroup

        public String getGroup()
        Returns the replacement string to use as group (eg '$2').
        Returns:
        the group
      • groupTipText

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