edu.stanford.nlp.classify
Class NaiveBayesClassifierFactory<L,F>
java.lang.Object
edu.stanford.nlp.classify.NaiveBayesClassifierFactory<L,F>
- All Implemented Interfaces:
- ClassifierFactory<L,F,NaiveBayesClassifier<L,F>>, Serializable
public class NaiveBayesClassifierFactory<L,F>
- extends 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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
NaiveBayesClassifierFactory
public NaiveBayesClassifierFactory()
NaiveBayesClassifierFactory
public NaiveBayesClassifierFactory(double alphaC,
double alphaF,
double sigma,
int prior,
int kind)
trainClassifier
@Deprecated
public NaiveBayesClassifier<L,F> trainClassifier(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(List<RVFDatum<L,F>> examples,
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(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