SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
loss
SquaredLoss.h
浏览该文件的文档.
1
/*
2
Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights
3
embodied in the content of this file are licensed under the BSD
4
(revised) open source license.
5
6
Copyright (c) 2011 Berlin Institute of Technology and Max-Planck-Society.
7
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3 of the License, or
11
(at your option) any later version.
12
13
Modifications (w) 2011 Shashwat Lal Das
14
Modifications (w) 2012 Fernando José Iglesias García
15
*/
16
17
#ifndef _SQUAREDLOSS_H__
18
#define _SQUAREDLOSS_H__
19
20
#include <
shogun/loss/LossFunction.h
>
21
22
namespace
shogun
23
{
27
class
CSquaredLoss
:
public
CLossFunction
28
{
29
public
:
33
CSquaredLoss
():
CLossFunction
() {};
34
38
~CSquaredLoss
() {};
39
48
float64_t
loss
(
float64_t
prediction,
float64_t
label);
49
57
float64_t
loss
(
float64_t
z);
58
67
float64_t
first_derivative
(
float64_t
prediction,
float64_t
label);
68
76
float64_t
first_derivative
(
float64_t
z);
77
86
float64_t
second_derivative
(
float64_t
prediction,
float64_t
label);
87
95
float64_t
second_derivative
(
float64_t
z);
96
107
virtual
float64_t
get_update
(
float64_t
prediction,
float64_t
label,
float64_t
eta_t,
float64_t
norm
);
108
117
virtual
float64_t
get_square_grad
(
float64_t
prediction,
float64_t
label);
118
124
virtual
ELossType
get_loss_type
() {
return
L_SQUAREDLOSS
; }
125
126
virtual
const
char
*
get_name
()
const
{
return
"SquaredLoss"
; }
127
};
128
129
}
130
131
#endif
SHOGUN
机器学习工具包 - 项目文档