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

详细描述

The class implements L2 penalty/regularization within the FirstOrderMinimizer framework.

For L2 penalty, \(L2(w)\)

\[ L2(w)=\frac{w^t w}{2} \]

在文件 L2Penalty.h46 行定义.

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

Public 成员函数

 L2Penalty ()
 
virtual ~L2Penalty ()
 
virtual float64_t get_penalty (float64_t variable)
 
virtual float64_t get_penalty_gradient (float64_t variable, float64_t gradient_of_variable)
 
virtual void update_context (CMinimizerContext *context)
 
virtual void load_from_context (CMinimizerContext *context)
 

构造及析构函数说明

L2Penalty ( )

在文件 L2Penalty.h50 行定义.

virtual ~L2Penalty ( )
virtual

在文件 L2Penalty.h53 行定义.

成员函数说明

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.

在文件 L2Penalty.h61 行定义.

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 Note that the penalized gradient=unpenalized gradient+penalty_gradient

For L2 penalty

\[ \frac{\partial L2(w) }{\partial w}=w \]

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

实现了 Penalty.

在文件 L2Penalty.h75 行定义.

virtual void load_from_context ( CMinimizerContext context)
virtual

Load the given context object to restore mutable variables

参数
contexta context object

实现了 Penalty.

在文件 L2Penalty.h92 行定义.

virtual void update_context ( CMinimizerContext context)
virtual

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

参数
contexta context object

实现了 Penalty.

在文件 L2Penalty.h83 行定义.


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

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