List of usage examples for org.apache.mahout.classifier.naivebayes StandardNaiveBayesClassifier computeWeight
public static double computeWeight(double featureLabelWeight, double labelWeight, double alphaI, double numFeatures)
From source file:com.netease.news.classifier.naivebayes.StandardThetaTrainer.java
License:Apache License
@Override public void train(int label, Vector perLabelWeight) { double labelWeight = labelWeight(label); for (Vector.Element e : perLabelWeight.nonZeroes()) { updatePerLabelThetaNormalizer(label, StandardNaiveBayesClassifier.computeWeight(e.get(), labelWeight, alphaI(), numFeatures())); }/* w w w .ja va 2 s . c o m*/ }