SHOGUN  v3.2.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
SquaredHingeLoss.cpp
浏览该文件的文档.
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 Technohingey and Max-Planck-Society.
10  */
11 
13 
14 using namespace shogun;
15 
17 {
18  return (z < 1) ? 0.5 * (1-z) * (1-z) : 0;
19 }
20 
22 {
23  return (z < 1) ? z-1 : 0;
24 }
25 
27 {
28  return (z < 1) ? 1 : 0;
29 }
30 
32 {
34  return -1;
35 }
36 
38 {
40  return -1;
41 }
double norm(double *v, double p, int n)
Definition: epph.cpp:452
float64_t loss(float64_t z)
float64_t second_derivative(float64_t z)
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:141
float64_t first_derivative(float64_t z)
virtual float64_t get_update(float64_t prediction, float64_t label, float64_t eta_t, float64_t norm)
double float64_t
Definition: common.h:48
virtual float64_t get_square_grad(float64_t prediction, float64_t label)

SHOGUN Machine Learning Toolbox - Documentation