edu.cmu.minorthird.classify.transform
Class InfoGainInstanceTransform

java.lang.Object
  extended by edu.cmu.minorthird.classify.transform.InfoGainInstanceTransform
All Implemented Interfaces:
InstanceTransform

public class InfoGainInstanceTransform
extends java.lang.Object
implements InstanceTransform

Author:
Edoardo M. Airoldi Date: Feb 6, 2004

Constructor Summary
InfoGainInstanceTransform()
          Constructor
 
Method Summary
 void addFeatureIG(double infoGain, Feature f)
          Adds the Info-Gain score of feature f to the InstanceTransform
 void setNumberOfFeatures(int number)
          Number of features with the highest Info-Gain scores to keep in the dataset
 java.lang.String toString(int top)
          get top ranked features
 Dataset transform(Dataset dataset)
          Transform a dataset according to Info-Gain criterion
 Example transform(Example example)
          Not used
 Instance transform(Instance instance)
          Not used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoGainInstanceTransform

public InfoGainInstanceTransform()
Constructor

Method Detail

transform

public Instance transform(Instance instance)
Not used

Specified by:
transform in interface InstanceTransform

transform

public Example transform(Example example)
Not used

Specified by:
transform in interface InstanceTransform

transform

public Dataset transform(Dataset dataset)
Transform a dataset according to Info-Gain criterion

Specified by:
transform in interface InstanceTransform

setNumberOfFeatures

public void setNumberOfFeatures(int number)
Number of features with the highest Info-Gain scores to keep in the dataset


addFeatureIG

public void addFeatureIG(double infoGain,
                         Feature f)
Adds the Info-Gain score of feature f to the InstanceTransform


toString

public java.lang.String toString(int top)
get top ranked features