org.apache.mahout.classifier.naivebayes.training
Class AbstractThetaTrainer

java.lang.Object
  extended by org.apache.mahout.classifier.naivebayes.training.AbstractThetaTrainer
Direct Known Subclasses:
ComplementaryThetaTrainer, StandardThetaTrainer

public abstract class AbstractThetaTrainer
extends Object


Constructor Summary
protected AbstractThetaTrainer(Vector weightsPerFeature, Vector weightsPerLabel, double alphaI)
           
 
Method Summary
protected  double alphaI()
           
protected  double featureWeight(int feature)
           
protected  double labelWeight(int label)
           
protected  double numFeatures()
           
 Vector retrievePerLabelThetaNormalizer()
           
protected  double totalWeightSum()
           
abstract  void train(int label, Vector instance)
           
protected  void updatePerLabelThetaNormalizer(int label, double weight)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractThetaTrainer

protected AbstractThetaTrainer(Vector weightsPerFeature,
                               Vector weightsPerLabel,
                               double alphaI)
Method Detail

train

public abstract void train(int label,
                           Vector instance)

alphaI

protected double alphaI()

numFeatures

protected double numFeatures()

labelWeight

protected double labelWeight(int label)

totalWeightSum

protected double totalWeightSum()

featureWeight

protected double featureWeight(int feature)

updatePerLabelThetaNormalizer

protected void updatePerLabelThetaNormalizer(int label,
                                             double weight)

retrievePerLabelThetaNormalizer

public Vector retrievePerLabelThetaNormalizer()


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.