edu.cmu.minorthird.classify.transform
Class FrequencyBasedTransformLearner

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

public class FrequencyBasedTransformLearner
extends java.lang.Object
implements InstanceTransformLearner

A simple feature filter based on their frequency of occurrence. The frequency model is resposible for deciding 'what to count'. If set to "document" this filter counts the number of documents which contain a Feature; if set to "word" this filter counts the number of times a Feature appears in the whole dataset.


Constructor Summary
FrequencyBasedTransformLearner()
          Default constructor, for use in gui.
FrequencyBasedTransformLearner(int minimumFrequency)
          This will "learn" an InstanceTransform that discards instances which appear in minimumFrequency or fewer examples.
FrequencyBasedTransformLearner(int minimumFrequency, java.lang.String frequencyModel)
           
 
Method Summary
 InstanceTransform batchTrain(Dataset dataset)
          Examine data, build an instance transformer
 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

FrequencyBasedTransformLearner

public FrequencyBasedTransformLearner()
Default constructor, for use in gui.


FrequencyBasedTransformLearner

public FrequencyBasedTransformLearner(int minimumFrequency)
This will "learn" an InstanceTransform that discards instances which appear in minimumFrequency or fewer examples.


FrequencyBasedTransformLearner

public FrequencyBasedTransformLearner(int minimumFrequency,
                                      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