edu.cmu.minorthird.classify.transform
Class InfoGainTransformLearner2

java.lang.Object
  extended by edu.cmu.minorthird.classify.transform.InfoGainTransformLearner2
All Implemented Interfaces:
InstanceTransformLearner

public class InfoGainTransformLearner2
extends java.lang.Object
implements InstanceTransformLearner

Author:
William Cohen Date: Nov 21, 2003, Edoardo Airoldi Date: Feb 05, 2004

Constructor Summary
InfoGainTransformLearner2()
          Default constructor, limits to 100 features
InfoGainTransformLearner2(int numFeatures)
          This will "learn" an InstanceTransform that discards with low info gain.
InfoGainTransformLearner2(int numFeatures, java.lang.String frequencyModel)
           
 
Method Summary
 InstanceTransform batchTrain(Dataset dataset)
          Examine data, build an instance transformer
 double Entropy(double[] p, double tot)
          compute the entropy of a non-binary attribute
 double entropy(double P1, double P2)
          compute the entropy of a binary attribute
 void setSchema(ExampleSchema schema)
          The schema's not used here...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoGainTransformLearner2

public InfoGainTransformLearner2()
Default constructor, limits to 100 features


InfoGainTransformLearner2

public InfoGainTransformLearner2(int numFeatures)
This will "learn" an InstanceTransform that discards with low info gain.


InfoGainTransformLearner2

public InfoGainTransformLearner2(int numFeatures,
                                 java.lang.String frequencyModel)
Method Detail

setSchema

public void setSchema(ExampleSchema schema)
The schema's not used here...

Specified by:
setSchema in interface InstanceTransformLearner

batchTrain

public InstanceTransform batchTrain(Dataset dataset)
Description copied from interface: InstanceTransformLearner
Examine data, build an instance transformer

Specified by:
batchTrain in interface InstanceTransformLearner

entropy

public double entropy(double P1,
                      double P2)
compute the entropy of a binary attribute


Entropy

public double Entropy(double[] p,
                      double tot)
compute the entropy of a non-binary attribute