The is the base class for L1 penalty/regularization within the FirstOrderMinimizer framework.
For L1 penalty, \(L1(w)\)
\[ L1(w)=\| w \|_1 = \sum_i \| w_i \| \]
This class implements the soft-threshold method. Reference: Proximal gradient method www.eecs.berkeley.edu/~elghaoui/Teaching/EE227A/lecture18.pdf
在文件 L1Penalty.h 第 52 行定义.

Public 成员函数 | |
| L1Penalty () | |
| virtual | ~L1Penalty () |
| virtual float64_t | get_penalty (float64_t variable) |
| virtual float64_t | get_penalty_gradient (float64_t variable, float64_t gradient_of_variable) |
| virtual void | set_rounding_epsilon (float64_t epsilon) |
| virtual void | update_variable_for_proximity (SGVector< float64_t > variable, float64_t proximal_weight) |
| virtual void | update_context (CMinimizerContext *context) |
| virtual void | load_from_context (CMinimizerContext *context) |
| virtual float64_t | get_sparse_variable (float64_t variable, float64_t penalty_weight) |
Protected 属性 | |
| float64_t | m_rounding_epsilon |
| L1Penalty | ( | ) |
在文件 L1Penalty.h 第 55 行定义.
|
virtual |
在文件 L1Penalty.h 第 58 行定义.
Given the value of a target variable, this method returns the penalty of the variable
| variable | value of the variable |
实现了 Penalty.
在文件 L1Penalty.h 第 66 行定义.
|
virtual |
Return the gradient of the penalty wrt a target variable
Note that for L1 penalty we do not compute the gradient/sub-gradient in our implementation. Instead, we do a proximal projection.
| variable | value of a target variable |
| gradient_of_variable | unregularized/unpenalized gradient of the variable |
实现了 Penalty.
在文件 L1Penalty.h 第 79 行定义.
Get the sparse variable
| variable | the raw variable |
| penalty_weight | weight of the penalty |
实现了 SparsePenalty.
在文件 L1Penalty.h 第 128 行定义.
|
virtual |
Load the given context object to restore mutable variables
| context | a context object |
实现了 Penalty.
被 L1PenaltyForTG 重载.
在文件 L1Penalty.h 第 118 行定义.
|
virtual |
|
virtual |
Update a context object to store mutable variables used in learning rate
| context | a context object |
实现了 Penalty.
被 L1PenaltyForTG 重载.
在文件 L1Penalty.h 第 109 行定义.
|
virtual |
Do proximal projection/operation in place
| variable | the raw variable |
| proximal_weight | weight of the penalty |
实现了 ProximalPenalty.
被 L1PenaltyForTG 重载.
在文件 L1Penalty.h 第 97 行定义.
|
protected |
rounding epsilon
在文件 L1Penalty.h 第 148 行定义.