SHOGUN  v3.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LogLossMargin.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 _LOGLOSSMARGIN_H__
13 #define _LOGLOSSMARGIN_H__
14 
16 
17 namespace shogun
18 {
23 {
24 public:
29 
34 
43 
52 
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_LOGLOSSMARGIN; }
90 
91  virtual const char* get_name() const { return "LogLossMargin"; }
92 };
93 
94 }
95 
96 #endif
double norm(double *v, double p, int n)
Definition: epph.cpp:452
Class CLossFunction is the base class of all loss functions.
Definition: LossFunction.h:53
float64_t second_derivative(float64_t z)
float64_t loss(float64_t z)
virtual ELossType get_loss_type()
Definition: LogLossMargin.h:89
double float64_t
Definition: common.h:48
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)
virtual float64_t get_square_grad(float64_t prediction, float64_t label)
virtual const char * get_name() const
Definition: LogLossMargin.h:91
Class CLogLossMargin implements a margin-based log-likelihood loss function.
Definition: LogLossMargin.h:22
ELossType
shogun loss type
Definition: LossFunction.h:27

SHOGUN Machine Learning Toolbox - Documentation