Documentation of 'cc.mallet.types.GainRatio' Java class
GainRatio
cc.mallet.types

Class GainRatio

  • All Implemented Interfaces:
    AlphabetCarrying, ConstantMatrix, Vector, java.io.Serializable


    public class GainRatio
    extends RankedFeatureVector
    List of features along with their thresholds sorted in descending order of the ratio of (1) information gained by splitting instances on the feature at its associated threshold value, to (2) the split information.

    The calculations performed do not take into consideration the instance weights.

    To create an instance of GainRatio from an InstanceList, one must do the following:

    InstanceList ilist = ... ... GainRatio gr = GainRatio.createGainRatio(ilist);

    J. R. Quinlan "Improved Use of Continuous Attributes in C4.5" ftp://ftp.cs.cmu.edu/project/jair/volume4/quinlan96a.ps

    See Also:
    Serialized Form
    • Field Detail

      • log2

        public static final double log2
    • Method Detail

      • sortInstances

        public static int[] sortInstances(InstanceList ilist,
                                          int[] instIndices,
                                          int featureIndex)
      • createGainRatio

        public static GainRatio createGainRatio(InstanceList ilist)
        Constructs a GainRatio object.
      • createGainRatio

        public static GainRatio createGainRatio(InstanceList ilist,
                                                int[] instIndices,
                                                int minNumInsts)
        Constructs a GainRatio object
      • getMaxValuedThreshold

        public double getMaxValuedThreshold()
        Returns:
        the threshold of the (feature, threshold) pair with with maximum gain ratio
      • getThresholdAtRank

        public double getThresholdAtRank(int rank)
        Returns:
        the threshold of the (feature, threshold) pair with the given rank
      • getBaseEntropy

        public double getBaseEntropy()
      • getBaseLabelDistribution

        public LabelVector getBaseLabelDistribution()
      • getNumSplitPointsForBestFeature

        public int getNumSplitPointsForBestFeature()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.