SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SquaredLoss.h
Go to the documentation of this file.
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 */
15 
16 #ifndef _SQUAREDLOSS_H__
17 #define _SQUAREDLOSS_H__
18 
20 
21 namespace shogun
22 {
27 {
28 public:
33 
38 
47  virtual float64_t loss(float64_t prediction, float64_t label);
48 
57  virtual float64_t first_derivative(float64_t prediction, float64_t label);
58 
67  virtual float64_t second_derivative(float64_t prediction, float64_t label);
68 
79  virtual float64_t get_update(float64_t prediction, float64_t label, float64_t eta_t, float64_t norm);
80 
89  virtual float64_t get_square_grad(float64_t prediction, float64_t label);
90 
96  virtual ELossType get_loss_type() { return L_SQUAREDLOSS; }
97 
98  virtual const char* get_name() const { return "SquaredLoss"; }
99 };
100 
101 }
102 
103 #endif

SHOGUN Machine Learning Toolbox - Documentation