SHOGUN
v1.1.0
|
CHingeLoss implements the hinge loss function.
Definition at line 26 of file HingeLoss.h.
Public Member Functions | |
CHingeLoss () | |
~CHingeLoss () | |
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 |
CHingeLoss | ( | ) |
Constructor
Definition at line 32 of file HingeLoss.h.
~CHingeLoss | ( | ) |
Destructor
Definition at line 37 of file HingeLoss.h.
float64_t first_derivative | ( | float64_t | prediction, |
float64_t | label | ||
) | [virtual] |
Get first derivative of the loss function
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 27 of file HingeLoss.cpp.
virtual ELossType get_loss_type | ( | ) | [virtual] |
Return type of loss
Implements CLossFunction.
Definition at line 96 of file HingeLoss.h.
virtual const char* get_name | ( | ) | const [virtual] |
Return the name of the object
Reimplemented from CLossFunction.
Definition at line 98 of file HingeLoss.h.
float64_t get_square_grad | ( | float64_t | prediction, |
float64_t | label | ||
) | [virtual] |
Get square of gradient, used for adaptive learning
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 46 of file HingeLoss.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
prediction | prediction |
label | label |
eta_t | learning rate at update number t |
norm | scale value |
Implements CLossFunction.
Definition at line 37 of file HingeLoss.cpp.
Get loss for an example
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 20 of file HingeLoss.cpp.
float64_t second_derivative | ( | float64_t | prediction, |
float64_t | label | ||
) | [virtual] |
Get second derivative of the loss function
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 32 of file HingeLoss.cpp.