ir.classifiers
Class BayesResult
java.lang.Object
|
+--ir.classifiers.BayesResult
- public class BayesResult
- extends java.lang.Object
An object to hold the result of training a NaiveBayes classifier.
Stores the class priors and the counts of features in each class.
Field Summary |
protected double[] |
classPriors
Stores the prior probabilities of each class |
protected java.util.Hashtable |
featureTable
Stores the counts for each feature: an entry in the hashTable stores
the array of class counts for a feature |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classPriors
protected double[] classPriors
- Stores the prior probabilities of each class
featureTable
protected java.util.Hashtable featureTable
- Stores the counts for each feature: an entry in the hashTable stores
the array of class counts for a feature
BayesResult
public BayesResult()
setClassPriors
public void setClassPriors(double[] priors)
- Sets the class priors
getClassPriors
public double[] getClassPriors()
- Returns the class priors
setFeatureTable
public void setFeatureTable(java.util.Hashtable table)
- Sets the feature hash
getFeatureTable
public java.util.Hashtable getFeatureTable()
- Returns the feature hash