edu.stanford.nlp.classify
Class NaiveBayesClassifierFactory<L,F>

java.lang.Object
  extended by edu.stanford.nlp.classify.NaiveBayesClassifierFactory<L,F>
All Implemented Interfaces:
ClassifierFactory<L,F,NaiveBayesClassifier<L,F>>, java.io.Serializable

public class NaiveBayesClassifierFactory<L,F>
extends java.lang.Object
implements ClassifierFactory<L,F,NaiveBayesClassifier<L,F>>

Author:
Kristina Toutanova (kristina@cs.stanford.edu) creates a NaiveBayesClassifier given an RVFDataset, Sarah Spikes (sdspikes@cs.stanford.edu) (Templatization)
See Also:
Serialized Form

Field Summary
static int CL
           
static int JL
           
static int UCL
           
 
Constructor Summary
NaiveBayesClassifierFactory()
           
NaiveBayesClassifierFactory(double alphaC, double alphaF, double sigma, int prior, int kind)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 NaiveBayesClassifier<L,F> trainClassifier(GeneralDataset<L,F> dataset)
           
 NaiveBayesClassifier<L,F> trainClassifier(java.util.List<RVFDatum<L,F>> examples)
          Deprecated. 
 NaiveBayesClassifier<L,F> trainClassifier(java.util.List<RVFDatum<L,F>> examples, java.util.Set<F> featureSet)
          The examples are assumed a list of RFVDatum the datums are assumed to not contain the zeros and then they are added to each instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JL

public static final int JL
See Also:
Constant Field Values

CL

public static final int CL
See Also:
Constant Field Values

UCL

public static final int UCL
See Also:
Constant Field Values
Constructor Detail

NaiveBayesClassifierFactory

public NaiveBayesClassifierFactory()

NaiveBayesClassifierFactory

public NaiveBayesClassifierFactory(double alphaC,
                                   double alphaF,
                                   double sigma,
                                   int prior,
                                   int kind)
Method Detail

trainClassifier

@Deprecated
public NaiveBayesClassifier<L,F> trainClassifier(java.util.List<RVFDatum<L,F>> examples)
Deprecated. 

The examples are assumed a list of RFVDatum the datums are assumed to contain the zeros as well

Specified by:
trainClassifier in interface ClassifierFactory<L,F,NaiveBayesClassifier<L,F>>

trainClassifier

public NaiveBayesClassifier<L,F> trainClassifier(java.util.List<RVFDatum<L,F>> examples,
                                                 java.util.Set<F> featureSet)
The examples are assumed a list of RFVDatum the datums are assumed to not contain the zeros and then they are added to each instance


main

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

trainClassifier

public NaiveBayesClassifier<L,F> trainClassifier(GeneralDataset<L,F> dataset)
Specified by:
trainClassifier in interface ClassifierFactory<L,F,NaiveBayesClassifier<L,F>>


Stanford NLP Group