SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
LogLoss.h
Go to the documentation of this file.
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 Technology and Max-Planck-Society.
10  */
11 
12 #ifndef _LOGLOSS_H__
13 #define _LOGLOSS_H__
14 
15 #include <shogun/lib/config.h>
16 
18 
19 namespace shogun
20 {
24 class CLogLoss: public CLossFunction
25 {
26 public:
31 
35  ~CLogLoss() {};
36 
45 
54 
63 
74  virtual float64_t get_update(float64_t prediction, float64_t label, float64_t eta_t, float64_t norm);
75 
84  virtual float64_t get_square_grad(float64_t prediction, float64_t label);
85 
91  virtual ELossType get_loss_type() { return L_LOGLOSS; }
92 
93  virtual const char* get_name() const { return "LogLoss"; }
94 };
95 
96 }
97 
98 #endif
virtual float64_t get_update(float64_t prediction, float64_t label, float64_t eta_t, float64_t norm)
Definition: LogLoss.cpp:36
virtual float64_t first_derivative(float64_t z)
Definition: LogLoss.cpp:21
Class CLossFunction is the base class of all loss functions.
Definition: LossFunction.h:57
virtual float64_t second_derivative(float64_t z)
Definition: LogLoss.cpp:30
double float64_t
Definition: common.h:50
virtual ELossType get_loss_type()
Definition: LogLoss.h:91
virtual const char * get_name() const
Definition: LogLoss.h:93
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
float64_t loss(float64_t z)
Definition: LogLoss.cpp:16
virtual float64_t get_square_grad(float64_t prediction, float64_t label)
Definition: LogLoss.cpp:62
ELossType
shogun loss type
Definition: LossFunction.h:28
CLogLoss implements the logarithmic loss function.
Definition: LogLoss.h:24

SHOGUN Machine Learning Toolbox - Documentation