25 #ifndef __MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP
26 #define __MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP
34 namespace optimization {
58 template<
typename LagrangianFunction>
96 bool Optimize(arma::mat& coordinates,
97 const size_t maxIterations = 1000);
111 bool Optimize(arma::mat& coordinates,
112 const arma::vec& initLambda,
113 const double initSigma,
114 const size_t maxIterations = 1000);
117 const LagrangianFunction&
Function()
const {
return function; }
119 LagrangianFunction&
Function() {
return function; }
138 LagrangianFunction&
function;
155 #include "aug_lagrangian_impl.hpp"
157 #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.
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.
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.