bayesresult.java
来自「一个使用的搜索引擎」· Java 代码 · 共 41 行
JAVA
41 行
package ir.classifiers;import java.util.*;/** * An object to hold the result of training a NaiveBayes classifier. * Stores the class priors and the counts of features in each class. * * @author Sugato Basu and Prem Melville */public class BayesResult{ /** Stores the prior probabilities of each class */ protected double[] classPriors; /** Stores the counts for each feature: an entry in the hashTable stores the array of class counts for a feature */ protected Hashtable featureTable; /** Sets the class priors */ public void setClassPriors(double[] priors){ classPriors = priors; } /** Returns the class priors */ public double[] getClassPriors(){ return(classPriors); } /** Sets the feature hash */ public void setFeatureTable(Hashtable table){ featureTable = table; } /** Returns the feature hash */ public Hashtable getFeatureTable(){ return(featureTable); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?