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)
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.public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput dataInput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.