public class L1 extends Object implements PriorFunction
| Constructor and Description |
|---|
L1() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
readFields(DataInput dataInput) |
void |
write(DataOutput out) |
public double age(double oldValue,
double generations,
double learningRate)
PriorFunctionage in interface PriorFunctionoldValue - The previous value.generations - The number of generations.learningRate - The learning rate with lambda baked in.public double logP(double betaIJ)
PriorFunctionlogP in interface PriorFunctionbetaIJ - The coefficient.public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput dataInput) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.