SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
所有成员列表 | Public 成员函数 | Protected 成员函数 | Protected 属性
ElasticNetPenalty类 参考

详细描述

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.h54 行定义.

类 ElasticNetPenalty 继承关系图:
Inheritance graph
[图例]

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
 
L1Penaltym_l1_penalty
 
L2Penaltym_l2_penalty
 

构造及析构函数说明

在文件 ElasticNetPenalty.h57 行定义.

virtual ~ElasticNetPenalty ( )
virtual

在文件 ElasticNetPenalty.h60 行定义.

成员函数说明

virtual void check_ratio ( )
protectedvirtual

check l1_ratio

在文件 ElasticNetPenalty.h163 行定义.

virtual float64_t get_penalty ( float64_t  variable)
virtual

Given the value of a target variable, this method returns the penalty of the variable

参数
variablevalue of the variable
返回
penalty of the variable

实现了 Penalty.

在文件 ElasticNetPenalty.h82 行定义.

virtual float64_t get_penalty_gradient ( float64_t  variable,
float64_t  gradient_of_variable 
)
virtual

Return the gradient of the penalty wrt a target variable

参数
variablevalue of a target variable
gradient_of_variableunregularized/unpenalized gradient of the variable
返回
the gradient of the penalty wrt the variable

实现了 Penalty.

在文件 ElasticNetPenalty.h96 行定义.

virtual float64_t get_sparse_variable ( float64_t  variable,
float64_t  penalty_weight 
)
virtual

Get the sparse variable

参数
variablethe raw variable
penalty_weightweight of the penalty
返回
sparse value of the variable

实现了 SparsePenalty.

在文件 ElasticNetPenalty.h154 行定义.

virtual void load_from_context ( CMinimizerContext context)
virtual

Load the given context object to restore mutable variables

参数
contexta context object

实现了 Penalty.

在文件 ElasticNetPenalty.h142 行定义.

virtual void set_l1_ratio ( float64_t  ratio)
virtual

set l1_ratio

参数
ratioratio must be in (0.0,1.0)

在文件 ElasticNetPenalty.h70 行定义.

virtual void set_rounding_epsilon ( float64_t  epsilon)
virtual

Set the rounding epsilon for L1 penalty

参数
epsilonrounding epsilon

在文件 ElasticNetPenalty.h110 行定义.

virtual void update_context ( CMinimizerContext context)
virtual

Update a context object to store mutable variables used in learning rate

参数
contexta context object

实现了 Penalty.

在文件 ElasticNetPenalty.h131 行定义.

virtual void update_variable_for_proximity ( SGVector< float64_t variable,
float64_t  proximal_weight 
)
virtual

Do proximal projection/operation in place

参数
variablethe raw variable
proximal_weightweight of the penalty

实现了 ProximalPenalty.

在文件 ElasticNetPenalty.h119 行定义.

类成员变量说明

L1Penalty* m_l1_penalty
protected

L1Penalty

在文件 ElasticNetPenalty.h172 行定义.

float64_t m_l1_ratio
protected

l1_ratio for L1 penalty and (1.0-l1_ratio) for L2 penalty

在文件 ElasticNetPenalty.h169 行定义.

L2Penalty* m_l2_penalty
protected

L2Penalty

在文件 ElasticNetPenalty.h175 行定义.


该类的文档由以下文件生成:

SHOGUN 机器学习工具包 - 项目文档