SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
loss
SmoothHingeLoss.h
浏览该文件的文档.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* Written (W) 2011 Shashwat Lal Das
8
* Written (W) 2012 Fernando José Iglesias García
9
* Copyright (c) 2011 Berlin Institute of TechnosmoothHingey and Max-Planck-Society.
10
*/
11
12
#ifndef _SMOOTHHINGELOSS_H__
13
#define _SMOOTHHINGELOSS_H__
14
15
#include <
shogun/loss/LossFunction.h
>
16
17
namespace
shogun
18
{
22
class
CSmoothHingeLoss
:
public
CLossFunction
23
{
24
public
:
28
CSmoothHingeLoss
():
CLossFunction
() {};
29
33
~CSmoothHingeLoss
() {};
34
42
float64_t
loss
(
float64_t
z);
43
51
float64_t
first_derivative
(
float64_t
z);
52
60
float64_t
second_derivative
(
float64_t
z);
61
72
virtual
float64_t
get_update
(
float64_t
prediction,
float64_t
label,
float64_t
eta_t,
float64_t
norm
);
73
82
virtual
float64_t
get_square_grad
(
float64_t
prediction,
float64_t
label);
83
89
virtual
ELossType
get_loss_type
() {
return
L_SMOOTHHINGELOSS
; }
90
91
virtual
const
char
*
get_name
()
const
{
return
"SmoothHingeLoss"
; }
92
};
93
94
}
95
96
#endif
SHOGUN
机器学习工具包 - 项目文档