Class implementing the gradient descent method.
Macros:
Enumerations:
None.
Typedefs:
None.
Struct CapyGradientDescent :
Struct CapyGradientDescent's properties:
Current position in the input space
Step size for each component of the input (default: 0.1)
Momentum (default: 0)
Current gradient
Reference to the objective function
Struct CapyGradientDescent's methods:
Destructor
Perform one step of the gradient descent method
Output and side effect(s):
that.in and that.gradient are updated
Functions:
Create a CapyGradientDescent
Input argument(s):
objFun: objective function (must have dimOut = 1)
initIn: initial position in input space (must be of dimension objFun.dimIn)
Output and side effect(s):
Return a CapyGradientDescent
Allocate memory for a new CapyGradientDescent and create it
Input argument(s):
objFun: objective function (must have dimOut = 1)
initIn: initial position in input space (must be of dimension objFun.dimIn)
Output and side effect(s):
Return a CapyGradientDescent
Exception(s):
May raise CapyExc_MallocFailed.
Free the memory used by a CapyGradientDescent* and reset '*that' to NULL
Input argument(s):
that: a pointer to the CapyGradientDescent to free