15 #ifndef MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP 16 #define MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP 24 namespace optimization {
48 template<
typename LagrangianFunction>
86 bool Optimize(arma::mat& coordinates,
87 const size_t maxIterations = 1000);
101 bool Optimize(arma::mat& coordinates,
102 const arma::vec& initLambda,
103 const double initSigma,
104 const size_t maxIterations = 1000);
107 const LagrangianFunction&
Function()
const {
return function; }
109 LagrangianFunction&
Function() {
return function; }
128 LagrangianFunction&
function;
145 #include "aug_lagrangian_impl.hpp" 147 #endif // MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP L_BFGSType & LBFGS()
Modify the L-BFGS object used for the actual optimization.
arma::vec & Lambda()
Modify the Lagrange multipliers (i.e. set them before optimization).
L_BFGSType & lbfgs
The L-BFGS optimizer that we will use.
Linear algebra utility functions, generally performed on matrices or vectors.
AugLagrangianFunction< LagrangianFunction > augfunc
Internally used AugLagrangianFunction which holds the function we are optimizing. ...
bool Optimize(arma::mat &coordinates, const size_t maxIterations=1000)
Optimize the function.
The core includes that mlpack expects; standard C++ includes and Armadillo.
LagrangianFunction & Function()
Modify the LagrangianFunction.
const L_BFGSType & LBFGS() const
Get the L-BFGS object used for the actual optimization.
The AugLagrangian class implements the Augmented Lagrangian method of optimization.
const arma::vec & Lambda() const
Get the Lagrange multipliers.
const LagrangianFunction & Function() const
Get the LagrangianFunction.
double & Sigma()
Modify the penalty parameter.
L_BFGSType lbfgsInternal
If the user did not pass an L_BFGS object, we'll use our own internal one.
This is a utility class used by AugLagrangian, meant to wrap a LagrangianFunction into a function usa...
AugLagrangian(LagrangianFunction &function)
Initialize the Augmented Lagrangian with the default L-BFGS optimizer.
The generic L-BFGS optimizer, which uses a back-tracking line search algorithm to minimize a function...
L_BFGS< AugLagrangianFunction< LagrangianFunction > > L_BFGSType
Shorthand for the type of the L-BFGS optimizer we'll be using.
double Sigma() const
Get the penalty parameter.