Class BinnedNumericClassRandomSplitGenerator

    • Field Detail

      • m_Percentage

        protected double m_Percentage
        the percentage.
      • m_PreserveOrder

        protected boolean m_PreserveOrder
        whether to preserve the order.
      • m_Algorithm

        protected adams.data.binning.algorithm.BinningAlgorithm m_Algorithm
        the binning algorithm.
      • m_Generated

        protected boolean m_Generated
        whether the split was generated.
    • Constructor Detail

      • BinnedNumericClassRandomSplitGenerator

        public BinnedNumericClassRandomSplitGenerator()
        Initializes the generator.
      • BinnedNumericClassRandomSplitGenerator

        public BinnedNumericClassRandomSplitGenerator​(weka.core.Instances data,
                                                      long seed,
                                                      double percentage)
        Initializes the generator. Does not preserve the order.
        Parameters:
        data - the dataset to split
        seed - the seed value to use for randomization
        percentage - the percentage of the training set (0-1)
      • BinnedNumericClassRandomSplitGenerator

        public BinnedNumericClassRandomSplitGenerator​(weka.core.Instances data,
                                                      double percentage)
        Initializes the generator. Preserves the order.
        Parameters:
        data - the dataset to split
        percentage - the percentage of the training set (0-1)
      • BinnedNumericClassRandomSplitGenerator

        public BinnedNumericClassRandomSplitGenerator​(weka.core.Instances data,
                                                      long seed,
                                                      double percentage,
                                                      boolean preserveOrder)
        Initializes the generator. Does not preserve the order.
        Parameters:
        data - the dataset to split
        seed - the seed value to use for randomization
        percentage - the percentage of the training set (0-1)
        preserveOrder - whether to preserve the order
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • 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 AbstractSplitGenerator
      • setPercentage

        public void setPercentage​(double value)
        Sets the split percentage.
        Specified by:
        setPercentage in interface adams.data.splitgenerator.RandomSplitGenerator<weka.core.Instances,​WekaTrainTestSetContainer>
        Specified by:
        setPercentage in interface RandomSplitGenerator
        Parameters:
        value - the percentage (0-1)
      • getPercentage

        public double getPercentage()
        Returns the split percentage.
        Specified by:
        getPercentage in interface adams.data.splitgenerator.RandomSplitGenerator<weka.core.Instances,​WekaTrainTestSetContainer>
        Specified by:
        getPercentage in interface RandomSplitGenerator
        Returns:
        the percentage (0-1)
      • percentageTipText

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

        public void setPreserveOrder​(boolean value)
        Sets whether to preserve the order.
        Specified by:
        setPreserveOrder in interface adams.data.splitgenerator.RandomSplitGenerator<weka.core.Instances,​WekaTrainTestSetContainer>
        Specified by:
        setPreserveOrder in interface RandomSplitGenerator
        Parameters:
        value - true if to preserve order
      • getPreserveOrder

        public boolean getPreserveOrder()
        Returns whether to preserve the order.
        Specified by:
        getPreserveOrder in interface adams.data.splitgenerator.RandomSplitGenerator<weka.core.Instances,​WekaTrainTestSetContainer>
        Specified by:
        getPreserveOrder in interface RandomSplitGenerator
        Returns:
        true if to preserve order
      • preserveOrderTipText

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

        public void setAlgorithm​(adams.data.binning.algorithm.BinningAlgorithm value)
        Sets the binning algorithm.
        Specified by:
        setAlgorithm in interface adams.data.binning.algorithm.BinningAlgorithmUser
        Parameters:
        value - the algorithm
      • getAlgorithm

        public adams.data.binning.algorithm.BinningAlgorithm getAlgorithm()
        Returns the binning algorithm.
        Specified by:
        getAlgorithm in interface adams.data.binning.algorithm.BinningAlgorithmUser
        Returns:
        the algorithm
      • algorithmTipText

        public String algorithmTipText()
        Returns the tip text for this property.
        Specified by:
        algorithmTipText in interface adams.data.binning.algorithm.BinningAlgorithmUser
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • canRandomize

        protected boolean canRandomize()
        Returns whether randomization is enabled.
        Specified by:
        canRandomize in class AbstractSplitGenerator
        Returns:
        true if to randomize
      • checkNext

        protected boolean checkNext()
        Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)
        Specified by:
        checkNext in class AbstractSplitGenerator
        Returns:
        true if the iterator has more elements.