edu.cmu.minorthird.classify.transform
Class D2TransformLearner

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

public class D2TransformLearner
extends java.lang.Object
implements InstanceTransformLearner

Author:
Edoardo Airoldi (eairoldi@cs.cmu.edu) Date: Mar 6, 2005

Constructor Summary
D2TransformLearner()
           
 
Method Summary
 InstanceTransform batchTrain(Dataset dataset)
          Examine data, build an instance transformer
 double getLength(Example e)
          Get the total number of words in an Example
static void main(java.lang.String[] args)
           
 java.util.TreeMap<java.lang.String,java.lang.Number> mudelta2np(double mu, double delta, double omega)
           
 void setALPHA(double desiredLevel)
          Set ALPHA to the desired level
 void setClassParameter(int j, double d)
          Set probability of class j to d
 void setFeatureGivenClassParameter(Feature f, int j, Estimate pms)
           
 void setFeaturePdf(Feature f, java.lang.String pdf)
          Set the PDF for feature f
 void setMAX_WORDS(int number)
          Set MAX_WORDS to the desired number
 void setMIN_WORDS(int number)
          Set MIN_WORDS to the desired number
 void setPDF(java.lang.String pdf)
          Set PDF to the desired value
 void setREF_LENGTH(double desiredLength)
          Set REF_LENGTH to the desired value
 void setSAMPLE(int size)
          Set SAMPLE SIZE to the desired level
 void setSchema(ExampleSchema schema)
          ExampleSchema not used here ...
 double T1(int x1, int x2)
          Compute the T1 statistic corresponding to the counts in two texts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

D2TransformLearner

public D2TransformLearner()
Method Detail

setSchema

public void setSchema(ExampleSchema schema)
ExampleSchema not used here ...

Specified by:
setSchema in interface InstanceTransformLearner

batchTrain

public InstanceTransform batchTrain(Dataset dataset)
Examine data, build an instance transformer

Specified by:
batchTrain in interface InstanceTransformLearner

setFeaturePdf

public void setFeaturePdf(Feature f,
                          java.lang.String pdf)
Set the PDF for feature f


setClassParameter

public void setClassParameter(int j,
                              double d)
Set probability of class j to d


setFeatureGivenClassParameter

public void setFeatureGivenClassParameter(Feature f,
                                          int j,
                                          Estimate pms)

mudelta2np

public java.util.TreeMap<java.lang.String,java.lang.Number> mudelta2np(double mu,
                                                                       double delta,
                                                                       double omega)

getLength

public double getLength(Example e)
Get the total number of words in an Example


T1

public double T1(int x1,
                 int x2)
Compute the T1 statistic corresponding to the counts in two texts


setREF_LENGTH

public void setREF_LENGTH(double desiredLength)
Set REF_LENGTH to the desired value


setPDF

public void setPDF(java.lang.String pdf)
Set PDF to the desired value


setMIN_WORDS

public void setMIN_WORDS(int number)
Set MIN_WORDS to the desired number


setMAX_WORDS

public void setMAX_WORDS(int number)
Set MAX_WORDS to the desired number


setSAMPLE

public void setSAMPLE(int size)
Set SAMPLE SIZE to the desired level


setALPHA

public void setALPHA(double desiredLevel)
Set ALPHA to the desired level


main

public static void main(java.lang.String[] args)