The is the base class for ElasticNet penalty/regularization within the FirstOrderMinimizer framework.
For ElasticNet penalty, \(ElasticNet(w)\)
\[ ElasticNet(w)= \lambda \| w \|_1 + (1.0-\lambda) \| w \|_2 \]
where \(\lambda\) is the l1_ratio.
Reference: Zou, Hui, and Trevor Hastie. "Regularization and variable selection via the elastic net." Journal of the Royal Statistical Society: Series B (Statistical Methodology) 67.2 (2005): 301-320.
在文件 ElasticNetPenalty.h 第 54 行定义.

Public 成员函数 | |
| ElasticNetPenalty () | |
| virtual | ~ElasticNetPenalty () |
| virtual void | set_l1_ratio (float64_t ratio) |
| 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 成员函数 | |
| virtual void | check_ratio () |
Protected 属性 | |
| float64_t | m_l1_ratio |
| L1Penalty * | m_l1_penalty |
| L2Penalty * | m_l2_penalty |
在文件 ElasticNetPenalty.h 第 57 行定义.
|
virtual |
在文件 ElasticNetPenalty.h 第 60 行定义.
|
protectedvirtual |
check l1_ratio
在文件 ElasticNetPenalty.h 第 163 行定义.
Given the value of a target variable, this method returns the penalty of the variable
| variable | value of the variable |
实现了 Penalty.
在文件 ElasticNetPenalty.h 第 82 行定义.
|
virtual |
Return the gradient of the penalty wrt a target variable
| variable | value of a target variable |
| gradient_of_variable | unregularized/unpenalized gradient of the variable |
实现了 Penalty.
在文件 ElasticNetPenalty.h 第 96 行定义.
Get the sparse variable
| variable | the raw variable |
| penalty_weight | weight of the penalty |
实现了 SparsePenalty.
在文件 ElasticNetPenalty.h 第 154 行定义.
|
virtual |
Load the given context object to restore mutable variables
| context | a context object |
实现了 Penalty.
在文件 ElasticNetPenalty.h 第 142 行定义.
|
virtual |
|
virtual |
Set the rounding epsilon for L1 penalty
| epsilon | rounding epsilon |
在文件 ElasticNetPenalty.h 第 110 行定义.
|
virtual |
Update a context object to store mutable variables used in learning rate
| context | a context object |
实现了 Penalty.
在文件 ElasticNetPenalty.h 第 131 行定义.
|
virtual |
Do proximal projection/operation in place
| variable | the raw variable |
| proximal_weight | weight of the penalty |
实现了 ProximalPenalty.
在文件 ElasticNetPenalty.h 第 119 行定义.
|
protected |
在文件 ElasticNetPenalty.h 第 172 行定义.
|
protected |
l1_ratio for L1 penalty and (1.0-l1_ratio) for L2 penalty
在文件 ElasticNetPenalty.h 第 169 行定义.
|
protected |
在文件 ElasticNetPenalty.h 第 175 行定义.