GClasses
GClasses::GActivationFunction Class Referenceabstract

The base class for activation functions. Typically, this are sigmoid-shaped functions used to "squash" the output of a network node. These are typically used in conjunction with the GNeuralNet class. More...

#include <GActivation.h>

Inheritance diagram for GClasses::GActivationFunction:
GClasses::GActivationAlgebraic GClasses::GActivationArcTan GClasses::GActivationBend GClasses::GActivationBiDir GClasses::GActivationGaussian GClasses::GActivationIdentity GClasses::GActivationLogistic GClasses::GActivationLogisticDerivative GClasses::GActivationRectifiedLinear GClasses::GActivationSin GClasses::GActivationSinc GClasses::GActivationSoftPlus GClasses::GActivationSoftPlus2 GClasses::GActivationTanH

Public Member Functions

 GActivationFunction ()
 
virtual ~GActivationFunction ()
 
virtual double center ()=0
 The center output value. This should return the value of squash(0.0). More...
 
virtual GActivationFunctionclone ()=0
 Returns a clone of this object. More...
 
virtual double derivative (double x)=0
 The derivative of the activation function. More...
 
virtual double derivativeOfNet (double net, double activation)
 This computes the derivative of the net value. (Sometimes, such as with GActivationLogistic, it is more efficient to compute this from the activation value, so both are provided.) More...
 
virtual double halfRange ()=0
 The absolute difference between the max (or min) output value and the center. More...
 
virtual double identityBias ()=0
 Returns a value to use for the bias when initializing this unit to approximate the identity function. More...
 
virtual double identityDiag ()=0
 Returns a value to use for the diagonal elements when initializing this unit to approximate the identity function. More...
 
virtual double inverse (double y)=0
 The inverse of the activation function. (This function may throw an exception if the activation function cannot be inverted.) More...
 
virtual const char * name () const =0
 Returns the name of this activation function. More...
 
GDomNodeserialize (GDom *pDoc) const
 Serialize this object. More...
 
virtual double squash (double x)=0
 The activation function. More...
 

Static Public Member Functions

static GActivationFunctiondeserialize (GDomNode *pNode)
 Deserialize this object. More...
 

Detailed Description

The base class for activation functions. Typically, this are sigmoid-shaped functions used to "squash" the output of a network node. These are typically used in conjunction with the GNeuralNet class.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual double GClasses::GActivationFunction::derivativeOfNet ( double  net,
double  activation 
)
inlinevirtual

This computes the derivative of the net value. (Sometimes, such as with GActivationLogistic, it is more efficient to compute this from the activation value, so both are provided.)

Reimplemented in GClasses::GActivationLogisticDerivative, GClasses::GActivationIdentity, GClasses::GActivationTanH, and GClasses::GActivationLogistic.

static GActivationFunction* GClasses::GActivationFunction::deserialize ( GDomNode pNode)
static

Deserialize this object.

GDomNode* GClasses::GActivationFunction::serialize ( GDom pDoc) const

Serialize this object.