org.apache.mahout.classifier.naivebayes
Class ComplementaryNaiveBayesClassifier
java.lang.Object
org.apache.mahout.classifier.AbstractVectorClassifier
org.apache.mahout.classifier.naivebayes.AbstractNaiveBayesClassifier
org.apache.mahout.classifier.naivebayes.ComplementaryNaiveBayesClassifier
public class ComplementaryNaiveBayesClassifier
- extends AbstractNaiveBayesClassifier
Class implementing the Naive Bayes Classifier Algorithm
Method Summary |
static double |
computeWeight(double featureWeight,
double featureLabelWeight,
double totalWeight,
double labelWeight,
double alphaI,
double numFeatures)
|
double |
getScoreForLabelFeature(int label,
int feature)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComplementaryNaiveBayesClassifier
public ComplementaryNaiveBayesClassifier(NaiveBayesModel model)
getScoreForLabelFeature
public double getScoreForLabelFeature(int label,
int feature)
- Specified by:
getScoreForLabelFeature
in class AbstractNaiveBayesClassifier
computeWeight
public static double computeWeight(double featureWeight,
double featureLabelWeight,
double totalWeight,
double labelWeight,
double alphaI,
double numFeatures)
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.