Class BestBinnedNumericClassRandomSplitGenerator

    • Field Detail

      • m_Percentage

        protected double m_Percentage
        the percentage.
      • m_PreserveOrder

        protected boolean m_PreserveOrder
        whether to preserve the order.
      • m_Algorithms

        protected adams.data.binning.algorithm.BinningAlgorithm[] m_Algorithms
        the algorithms to evaluate.
      • m_NumEvaluationBins

        protected int m_NumEvaluationBins
        the number of evaluation bins.
      • m_Generated

        protected boolean m_Generated
        whether the split was generated.
      • m_Manual

        protected adams.data.binning.algorithm.ManualBinning m_Manual
        for generating class distributions.
    • Constructor Detail

      • BestBinnedNumericClassRandomSplitGenerator

        public BestBinnedNumericClassRandomSplitGenerator()
    • 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.
      • setAlgorithms

        public void setAlgorithms​(adams.data.binning.algorithm.BinningAlgorithm[] value)
        Sets the binning algorithms to choose from.
        Parameters:
        value - the algorithms
      • getAlgorithms

        public adams.data.binning.algorithm.BinningAlgorithm[] getAlgorithms()
        Returns the binning algorithms to choose from.
        Returns:
        the algorithms
      • algorithmsTipText

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

        public void setNumEvaluationBins​(int value)
        Sets the number of bints to use during evaluation.
        Parameters:
        value - the number of bins
      • getNumEvaluationBins

        public int getNumEvaluationBins()
        Returns the number of bins to use during evaluation.
        Returns:
        the number of bins
      • numEvaluationBinsTipText

        public String numEvaluationBinsTipText()
        Returns the tip text for this property.
        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.
      • calcDistribution

        protected double[] calcDistribution​(List<adams.data.binning.Binnable<weka.core.Instance>> binnable,
                                            double emptyBinValue)
        Calculates the class distribution.
        Parameters:
        binnable - the instances to calculate the distribution for
        emptyBinValue - the value to use for empty bins
        Returns:
        the distribution