org.apache.mahout.classifier.sgd
Class UniformPrior

java.lang.Object
  extended by org.apache.mahout.classifier.sgd.UniformPrior
All Implemented Interfaces:
PriorFunction

public class UniformPrior
extends java.lang.Object
implements PriorFunction

A uniform prior. This is an improper prior that corresponds to no regularization at all.


Constructor Summary
UniformPrior()
           
 
Method Summary
 double age(double oldValue, double generations, double learningRate)
          Applies the regularization to a coefficient.
 double logP(double betaIJ)
          Returns the log of the probability of a particular coefficient value according to the prior.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformPrior

public UniformPrior()
Method Detail

age

public double age(double oldValue,
                  double generations,
                  double learningRate)
Description copied from interface: PriorFunction
Applies the regularization to a coefficient.

Specified by:
age in interface PriorFunction
Parameters:
oldValue - The previous value.
generations - The number of generations.
learningRate - The learning rate with lambda baked in.
Returns:
The new coefficient value after regularization.

logP

public double logP(double betaIJ)
Description copied from interface: PriorFunction
Returns the log of the probability of a particular coefficient value according to the prior.

Specified by:
logP in interface PriorFunction
Parameters:
betaIJ - The coefficient.
Returns:
The log probability.


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.