com.datumbox.framework.core.mathematics.regularization
Class L1Regularizer
- java.lang.Object
-
- com.datumbox.framework.core.mathematics.regularization.L1Regularizer
-
public class L1Regularizer extends java.lang.ObjectUtility class for L1 regularization. https://www.cs.ubc.ca/~murphyk/Teaching/CS540-Fall08/L13.pdf http://www.aclweb.org/anthology/P09-1054
-
-
Constructor Summary
Constructors Constructor and Description L1Regularizer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static <K> doubleestimatePenalty(double l1, java.util.Map<K,java.lang.Double> weights)Estimates the penalty by adding the L1 regularization.static <K> voidupdateWeights(double l1, double learningRate, java.util.Map<K,java.lang.Double> weights, java.util.Map<K,java.lang.Double> newWeights)Updates the weights by applying the L1 regularization.
-
-
-
Method Detail
-
updateWeights
public static <K> void updateWeights(double l1, double learningRate, java.util.Map<K,java.lang.Double> weights, java.util.Map<K,java.lang.Double> newWeights)Updates the weights by applying the L1 regularization.- Type Parameters:
K-- Parameters:
l1-learningRate-weights-newWeights-
-
estimatePenalty
public static <K> double estimatePenalty(double l1, java.util.Map<K,java.lang.Double> weights)Estimates the penalty by adding the L1 regularization.- Type Parameters:
K-- Parameters:
l1-weights-- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG