|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ir.classifiers.BayesResult
public class BayesResult
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<java.lang.String,double[]> |
featureTable
Stores the counts for each feature: an entry in the hashTable stores the array of class counts for a feature |
Constructor Summary | |
---|---|
BayesResult()
|
Method Summary | |
---|---|
double[] |
getClassPriors()
Returns the class priors |
java.util.Hashtable<java.lang.String,double[]> |
getFeatureTable()
Returns the feature hash |
void |
setClassPriors(double[] priors)
Sets the class priors |
void |
setFeatureTable(java.util.Hashtable<java.lang.String,double[]> table)
Sets the feature hash |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double[] classPriors
protected java.util.Hashtable<java.lang.String,double[]> featureTable
Constructor Detail |
---|
public BayesResult()
Method Detail |
---|
public void setClassPriors(double[] priors)
public double[] getClassPriors()
public void setFeatureTable(java.util.Hashtable<java.lang.String,double[]> table)
public java.util.Hashtable<java.lang.String,double[]> getFeatureTable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |