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
 
Constructor Summary
BayesResult()
           
 
Method Summary
 double[] getClassPriors()
          Returns the class priors
 java.util.Hashtable getFeatureTable()
          Returns the feature hash
 void setClassPriors(double[] priors)
          Sets the class priors
 void setFeatureTable(java.util.Hashtable 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

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
Constructor Detail

BayesResult

public BayesResult()
Method Detail

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