Public Member Functions

CLogLoss Class Reference


Detailed Description

CLogLoss implements the logarithmic loss function.

Definition at line 21 of file LogLoss.h.

Inheritance diagram for CLogLoss:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CLogLoss ()
 ~CLogLoss ()
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

Constructor & Destructor Documentation

CLogLoss (  ) 

Constructor

Definition at line 27 of file LogLoss.h.

~CLogLoss (  ) 

Destructor

Definition at line 32 of file LogLoss.h.


Member Function Documentation

float64_t first_derivative ( float64_t  prediction,
float64_t  label 
) [virtual]

Get first derivative of the loss function

Parameters:
prediction prediction
label label
Returns:
first derivative

Implements CLossFunction.

Definition at line 23 of file LogLoss.cpp.

virtual ELossType get_loss_type (  )  [virtual]

Return loss type

Returns:
L_LOGLOSS

Implements CLossFunction.

Definition at line 91 of file LogLoss.h.

virtual const char* get_name ( void   )  const [virtual]

Return the name of the object

Returns:
LossFunction

Reimplemented from CLossFunction.

Definition at line 93 of file LogLoss.h.

float64_t get_square_grad ( float64_t  prediction,
float64_t  label 
) [virtual]

Get square of gradient, used for adaptive learning

Parameters:
prediction prediction
label label
Returns:
square of gradient

Implements CLossFunction.

Definition at line 66 of file LogLoss.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:
prediction prediction
label label
eta_t learning rate at update number t
norm scale value
Returns:
update

Implements CLossFunction.

Definition at line 40 of file LogLoss.cpp.

float64_t loss ( float64_t  prediction,
float64_t  label 
) [virtual]

Get loss for an example

Parameters:
prediction prediction
label label
Returns:
loss

Implements CLossFunction.

Definition at line 15 of file LogLoss.cpp.

float64_t second_derivative ( float64_t  prediction,
float64_t  label 
) [virtual]

Get second derivative of the loss function

Parameters:
prediction prediction
label label
Returns:
second derivative

Implements CLossFunction.

Definition at line 32 of file LogLoss.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation