GClasses
GClasses::GObjective Class Referenceabstract

Detailed Description

A loss function used to train a differentiable function.

#include <GOptimizer.h>

Inheritance diagram for GClasses::GObjective:
GClasses::GSquaredError

Public Member Functions

 GObjective ()
 
virtual ~GObjective ()
 
virtual void calculateOutputLayerBlame (const GVec &prediction, const GVec &label, GVec &blame)=0
 Calculate the error term (a.k.a. blame) associated with the activation of this layer. More...
 
virtual void evaluate (const GVec &prediction, const GVec &label, GVec &loss)=0
 Calculate the error. More...
 
virtual void setSlack (const GVec &slack)
 Enable the use of slack (a margin-of-error). More...
 

Protected Attributes

GVec m_slack
 
bool m_useSlack
 

Constructor & Destructor Documentation

GClasses::GObjective::GObjective ( )
inline
virtual GClasses::GObjective::~GObjective ( )
inlinevirtual

Member Function Documentation

virtual void GClasses::GObjective::calculateOutputLayerBlame ( const GVec prediction,
const GVec label,
GVec blame 
)
pure virtual

Calculate the error term (a.k.a. blame) associated with the activation of this layer.

Implemented in GClasses::GSquaredError.

virtual void GClasses::GObjective::evaluate ( const GVec prediction,
const GVec label,
GVec loss 
)
pure virtual

Calculate the error.

Implemented in GClasses::GSquaredError.

virtual void GClasses::GObjective::setSlack ( const GVec slack)
inlinevirtual

Enable the use of slack (a margin-of-error).

Member Data Documentation

GVec GClasses::GObjective::m_slack
protected
bool GClasses::GObjective::m_useSlack
protected