org.apache.mahout.classifier.naivebayes
Class NaiveBayesModel
java.lang.Object
org.apache.mahout.classifier.naivebayes.NaiveBayesModel
public class NaiveBayesModel
- extends Object
NaiveBayesModel holds the weight Matrix, the feature and label sums and the weight normalizer vectors.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NaiveBayesModel
public NaiveBayesModel(Matrix matrix,
Vector featureSum,
Vector labelSum,
Vector thetaNormalizer,
float alphaI)
setPerlabelThetaNormalizer
public void setPerlabelThetaNormalizer(Vector perlabelThetaNormalizer)
setFeatureSum
public void setFeatureSum(Vector featureSum)
setWeightMatrix
public void setWeightMatrix(Matrix weightMatrix)
setAlphaI
public void setAlphaI(float alphaI)
setVocabCount
public void setVocabCount(double vocabCount)
setTotalSum
public void setTotalSum(double totalSum)
getLabelSum
public Vector getLabelSum()
getPerlabelThetaNormalizer
public Vector getPerlabelThetaNormalizer()
getFeatureSum
public Vector getFeatureSum()
getWeightMatrix
public Matrix getWeightMatrix()
getAlphaI
public float getAlphaI()
getVocabCount
public double getVocabCount()
getTotalSum
public double getTotalSum()
getNumLabels
public int getNumLabels()
getModelName
public static String getModelName()
fromMRTrainerOutput
public static NaiveBayesModel fromMRTrainerOutput(org.apache.hadoop.fs.Path output,
org.apache.hadoop.conf.Configuration conf)
validate
public static void validate(NaiveBayesModel model)
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.