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; }
117 const arma::vec&
Lambda()
const {
return augfunc.Lambda(); }
119 arma::vec&
Lambda() {
return augfunc.Lambda(); }
122 double Sigma()
const {
return augfunc.Sigma(); }
124 double&
Sigma() {
return augfunc.Sigma(); }
128 LagrangianFunction&
function;
145 #include "aug_lagrangian_impl.hpp"
147 #endif // MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP
double & Sigma()
Modify the penalty parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
AugLagrangian(LagrangianFunction &function)
Initialize the Augmented Lagrangian with the default L-BFGS optimizer.
double Sigma() const
Get the penalty parameter.
The AugLagrangian class implements the Augmented Lagrangian method of optimization.
LagrangianFunction & Function()
Modify the LagrangianFunction.
const L_BFGSType & LBFGS() const
Get the L-BFGS object used for the actual optimization.
This is a utility class used by AugLagrangian, meant to wrap a LagrangianFunction into a function usa...
L_BFGSType & LBFGS()
Modify the L-BFGS object used for the actual optimization.
The generic L-BFGS optimizer, which uses a back-tracking line search algorithm to minimize a function...
bool Optimize(arma::mat &coordinates, const size_t maxIterations=1000)
Optimize the function.
arma::vec & Lambda()
Modify the Lagrange multipliers (i.e. set them before optimization).
const arma::vec & Lambda() const
Get the Lagrange multipliers.
const LagrangianFunction & Function() const
Get the LagrangianFunction.
L_BFGS< AugLagrangianFunction< LagrangianFunction > > L_BFGSType
Shorthand for the type of the L-BFGS optimizer we'll be using.