GClasses
GClasses::GSquaredError Class Reference

Detailed Description

The default loss function is squared error.

#include <GOptimizer.h>

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

Public Member Functions

virtual void calculateOutputLayerBlame (const GVec &prediction, const GVec &label, GVec &blame) override
 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) override
 Calculate the error. More...
 
- Public Member Functions inherited from GClasses::GObjective
 GObjective ()
 
virtual ~GObjective ()
 
virtual void setSlack (const GVec &slack)
 Enable the use of slack (a margin-of-error). More...
 

Additional Inherited Members

- Protected Attributes inherited from GClasses::GObjective
GVec m_slack
 
bool m_useSlack
 

Member Function Documentation

virtual void GClasses::GSquaredError::calculateOutputLayerBlame ( const GVec prediction,
const GVec label,
GVec blame 
)
overridevirtual

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

Implements GClasses::GObjective.

virtual void GClasses::GSquaredError::evaluate ( const GVec prediction,
const GVec label,
GVec loss 
)
overridevirtual

Calculate the error.

Implements GClasses::GObjective.