|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.sgd.L2
public class L2
Implements the Gaussian prior. This prior has a tendency to decrease large coefficients toward zero, but doesn't tend to set them to exactly zero.
Constructor Summary | |
---|---|
L2(double scale)
|
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 |
---|
public L2(double scale)
Method Detail |
---|
public double age(double oldValue, double generations, double learningRate)
PriorFunction
age
in interface PriorFunction
oldValue
- The previous value.generations
- The number of generations.learningRate
- The learning rate with lambda baked in.
public double logP(double betaIJ)
PriorFunction
logP
in interface PriorFunction
betaIJ
- The coefficient.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |