Class GiniSplitCriterion

    • Constructor Detail

      • GiniSplitCriterion

        public GiniSplitCriterion()
    • Method Detail

      • getMeritOfSplit

        public double getMeritOfSplit​(double[] preSplitDist,
                                      double[][] postSplitDists)
        Description copied from interface: SplitCriterion
        Computes the merit of splitting for a given ditribution before the split and after it.
        Specified by:
        getMeritOfSplit in interface SplitCriterion
        Parameters:
        preSplitDist - the class distribution before the split
        postSplitDists - the class distribution after the split
        Returns:
        value of the merit of splitting
      • getRangeOfMerit

        public double getRangeOfMerit​(double[] preSplitDist)
        Description copied from interface: SplitCriterion
        Computes the range of splitting merit
        Specified by:
        getRangeOfMerit in interface SplitCriterion
        Parameters:
        preSplitDist - the class distribution before the split
        Returns:
        value of the range of splitting merit
      • computeGini

        public static double computeGini​(double[] dist,
                                         double distSumOfWeights)
      • computeGini

        public static double computeGini​(double[] dist)
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int indent)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Specified by:
        getDescription in interface MOAObject
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent
      • prepareForUseImpl

        protected void prepareForUseImpl​(TaskMonitor monitor,
                                         ObjectRepository repository)
        Description copied from class: AbstractOptionHandler
        This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.
        Specified by:
        prepareForUseImpl in class AbstractOptionHandler
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use