org.apache.mahout.df.split
Class DefaultIgSplit

java.lang.Object
  extended by org.apache.mahout.df.split.IgSplit
      extended by org.apache.mahout.df.split.DefaultIgSplit

public class DefaultIgSplit
extends IgSplit

Default, not optimized, implementation of IgSplit


Field Summary
 
Fields inherited from class org.apache.mahout.df.split.IgSplit
LOG2
 
Constructor Summary
DefaultIgSplit()
           
 
Method Summary
protected  double categoricalIg(Data data, int attr)
          Computes the Information Gain for a CATEGORICAL attribute
 Split computeSplit(Data data, int attr)
          Computes the best split for the given attribute
protected  double entropy(Data data)
          Computes the Entropy
protected  double numericalIg(Data data, int attr, double split)
          Computes the Information Gain for a NUMERICAL attribute given a splitting value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIgSplit

public DefaultIgSplit()
Method Detail

computeSplit

public Split computeSplit(Data data,
                          int attr)
Description copied from class: IgSplit
Computes the best split for the given attribute

Specified by:
computeSplit in class IgSplit

categoricalIg

protected double categoricalIg(Data data,
                               int attr)
Computes the Information Gain for a CATEGORICAL attribute


numericalIg

protected double numericalIg(Data data,
                             int attr,
                             double split)
Computes the Information Gain for a NUMERICAL attribute given a splitting value


entropy

protected double entropy(Data data)
Computes the Entropy



Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.