edu.stanford.nlp.classify
Class NaiveBayesClassifierFactory
java.lang.Object
edu.stanford.nlp.classify.NaiveBayesClassifierFactory
- All Implemented Interfaces:
- ClassifierFactory, Serializable
public class NaiveBayesClassifierFactory
- extends Object
- implements ClassifierFactory
- Author:
- Kristina Toutanova (kristina@cs.stanford.edu)
creates a NaiveBayesClassifier given an RVFDataset
- See Also:
- Serialized Form
Field Summary |
static int |
CL
|
static int |
JL
|
static int |
UCL
|
Method Summary |
static void |
main(String[] args)
|
Classifier |
trainClassifier(List examples)
The examples are assumed a list of RFVDatum
the datums are assumed to contain the zeros as well |
Classifier |
trainClassifier(List examples,
Set 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 |
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
public Classifier trainClassifier(List examples)
- The examples are assumed a list of RFVDatum
the datums are assumed to contain the zeros as well
- Specified by:
trainClassifier
in interface ClassifierFactory
- Parameters:
examples
-
- Returns:
trainClassifier
public Classifier trainClassifier(List examples,
Set 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
- Parameters:
examples
-
- Returns:
main
public static void main(String[] args)
Stanford NLP Group