SHOGUN
v1.1.0
|
CSquaredLoss implements the squared loss function.
Definition at line 26 of file SquaredLoss.h.
Public Member Functions | |
CSquaredLoss () | |
~CSquaredLoss () | |
virtual 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 |
![]() | |
CLossFunction () | |
virtual | ~CLossFunction () |
![]() | |
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) |
SGIO * | get_global_io () |
void | set_global_parallel (Parallel *parallel) |
Parallel * | get_global_parallel () |
void | set_global_version (Version *version) |
Version * | get_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 | |
![]() | |
SGIO * | io |
Parallel * | parallel |
Version * | version |
Parameter * | m_parameters |
Parameter * | m_model_selection_parameters |
![]() | |
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) |
CSquaredLoss | ( | ) |
Constructor
Definition at line 32 of file SquaredLoss.h.
~CSquaredLoss | ( | ) |
Destructor
Definition at line 37 of file SquaredLoss.h.
Get square of the gradient of the loss function
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 28 of file SquaredLoss.cpp.
|
virtual |
Return loss type
Implements CLossFunction.
Definition at line 96 of file SquaredLoss.h.
|
virtual |
Return the name of the object
Reimplemented from CLossFunction.
Definition at line 98 of file SquaredLoss.h.
Get square of gradient, used for adaptive learning
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 51 of file SquaredLoss.cpp.
|
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 38 of file SquaredLoss.cpp.
Get loss for an example
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 21 of file SquaredLoss.cpp.
Get second derivative of the loss function
prediction | prediction |
label | label |
Implements CLossFunction.
Definition at line 33 of file SquaredLoss.cpp.