## 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

Field Summary

Fields inherited from class org.apache.mahout.classifier.AbstractVectorClassifier
`MIN_LOG_LIKELIHOOD`

Constructor Summary
`ComplementaryNaiveBayesClassifier(NaiveBayesModel model)`

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 org.apache.mahout.classifier.naivebayes.AbstractNaiveBayesClassifier
`classify, classifyFull, classifyFull, classifyScalar, getModel, getScoreForLabelInstance, numCategories`

Methods inherited from class org.apache.mahout.classifier.AbstractVectorClassifier
`classify, classifyFull, classifyNoLink, classifyScalar, logLikelihood`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComplementaryNaiveBayesClassifier

    public ComplementaryNaiveBayesClassifier(NaiveBayesModel model)

Method Detail

### 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.