mlpack  git-master
AddDecomposableEvaluateWithGradient< FunctionType, true, false > Class Template Reference

If we have a both decomposable Evaluate() and a decomposable Gradient() but not a decomposable EvaluateWithGradient(), add a decomposable EvaluateWithGradient() method. More...

Public Member Functions

double EvaluateWithGradient (const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize)
 Return both the evaluated objective function and its gradient, storing the gradient in the given matrix, starting at the given decomposable function and using the given batch size. More...

 

Detailed Description


template
<
typename
FunctionType
>

class mlpack::optimization::AddDecomposableEvaluateWithGradient< FunctionType, true, false >

If we have a both decomposable Evaluate() and a decomposable Gradient() but not a decomposable EvaluateWithGradient(), add a decomposable EvaluateWithGradient() method.

Definition at line 76 of file add_decomposable_evaluate_with_gradient.hpp.

Member Function Documentation

◆ EvaluateWithGradient()

double EvaluateWithGradient ( const arma::mat &  coordinates,
const size_t  begin,
arma::mat &  gradient,
const size_t  batchSize 
)
inline

Return both the evaluated objective function and its gradient, storing the gradient in the given matrix, starting at the given decomposable function and using the given batch size.

Parameters
coordinatesCoordinates to evaluate the function at.
beginIndex of decomposable function to begin with.
gradientMatrix to store the gradient into.
batchSizeNumber of decomposable functions to evaluate.

Definition at line 89 of file add_decomposable_evaluate_with_gradient.hpp.


The documentation for this class was generated from the following file: