SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions
CSmoothHingeLoss Class Reference

Detailed Description

CSmoothHingeLoss implements the smooth hinge loss function.

Definition at line 21 of file SmoothHingeLoss.h.

Inheritance diagram for CSmoothHingeLoss:
Inheritance graph
[legend]

Public Member Functions

 CSmoothHingeLoss ()
 ~CSmoothHingeLoss ()
float64_t loss (float64_t prediction, float64_t label)
virtual float64_t first_derivative (float64_t prediction, float64_t label)
virtual float64_t second_derivative (float64_t prediction, float64_t label)
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 ELossType get_loss_type ()
virtual const char * get_name () const
- Public Member Functions inherited from CLossFunction
 CLossFunction ()
virtual ~CLossFunction ()
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

Constructor

Definition at line 27 of file SmoothHingeLoss.h.

Destructor

Definition at line 32 of file SmoothHingeLoss.h.

Member Function Documentation

float64_t first_derivative ( float64_t  prediction,
float64_t  label 
)
virtual

Get first derivative of the loss function

Parameters
predictionprediction
labellabel
Returns
first derivative

Implements CLossFunction.

Definition at line 25 of file SmoothHingeLoss.cpp.

virtual ELossType get_loss_type ( )
virtual

Return loss type

Returns
L_SMOOTHHINGELOSS

Implements CLossFunction.

Definition at line 91 of file SmoothHingeLoss.h.

virtual const char* get_name ( ) const
virtual

Return the name of the object

Returns
LossFunction

Reimplemented from CLossFunction.

Definition at line 93 of file SmoothHingeLoss.h.

float64_t get_square_grad ( float64_t  prediction,
float64_t  label 
)
virtual

Get square of gradient, used for adaptive learning

Parameters
predictionprediction
labellabel
Returns
square of gradient

Implements CLossFunction.

Definition at line 51 of file SmoothHingeLoss.cpp.

float64_t get_update ( float64_t  prediction,
float64_t  label,
float64_t  eta_t,
float64_t  norm 
)
virtual

Get importance aware weight update for this loss function

Parameters
predictionprediction
labellabel
eta_tlearning rate at update number t
normscale value
Returns
update

Implements CLossFunction.

Definition at line 45 of file SmoothHingeLoss.cpp.

float64_t loss ( float64_t  prediction,
float64_t  label 
)
virtual

Get loss for an example

Parameters
predictionprediction
labellabel
Returns
loss

Implements CLossFunction.

Definition at line 15 of file SmoothHingeLoss.cpp.

float64_t second_derivative ( float64_t  prediction,
float64_t  label 
)
virtual

Get second derivative of the loss function

Parameters
predictionprediction
labellabel
Returns
second derivative

Implements CLossFunction.

Definition at line 35 of file SmoothHingeLoss.cpp.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation