Turi Create  4.0
turi::optimization::constraint_interface Class Referenceabstract

#include <ml/optimization/constraint_interface.hpp>

Public Member Functions

virtual ~constraint_interface ()
 
virtual void project (DenseVector &point) const =0
 
virtual void project_block (DenseVector &point, const size_t block_start, const size_t block_size) const =0
 
virtual bool is_satisfied (const DenseVector &point) const =0
 
virtual double first_order_optimality_conditions (const DenseVector &point, const DenseVector &gradient) const =0
 

Detailed Description

Interface for constraints for Gradient Projection solvers. See chapter 12 of (1) for an intro to constrained optimization.

Some implementations are based on Section 16.7 of (1).

Background: Gradient Projection Methods

Gradient project methods are methods for solving bound constrained optimization problems.

Traditionally, in unconstrained optimization, we solve the problem f(x) using a gradient descent method as follows:

        x_{k+1} = x_{k} - \alpha_k \grad f(x_k)             (G)

where is a step size.

The gradient-projection framework performs solves the problem: {x C} f(x) using a slight modification to the gradient step in (G)

    x_{k+1} =  P_C(x_{k} - \alpha_k \grad f(x_k))       (PG)

where P_C is the projection of a point on to the convex set.

P_C(z) = \min_{x \in z} ||x-z||^2

which works out to be the closest point to the set in C.

Comparison of gradient projection with other methods

In solving bound constrained optimization problems, active set methods face criticism because the working set changes slowly; at each iteration, at most one constraint is added to or dropped from the working set. If there are k0 constraints active at the initial W0, but kθ constraints active at the solution, then at least |kθ−k0| iterations are required for convergence. This property can be a serious disadvantage in large problems if the working set at the starting point is vastly different from the active set at the solution.

The gradient-projection method is guaranteed to identify the active set at a solution in a finite number of iterations. After it has identified the correct active set, the gradient-projection algorithm reduces to the steepest-descent algorithm on the subspace of free variables.

References:

(1) Wright S.J and J. Nocedal. Numerical optimization. Vol. 2. New York: Springer, 1999. (Chapter 12)

Definition at line 93 of file constraint_interface.hpp.

Constructor & Destructor Documentation

◆ ~constraint_interface()

virtual turi::optimization::constraint_interface::~constraint_interface ( )
inlinevirtual

Default desctuctor.

Definition at line 100 of file constraint_interface.hpp.

Member Function Documentation

◆ first_order_optimality_conditions()

virtual double turi::optimization::constraint_interface::first_order_optimality_conditions ( const DenseVector &  point,
const DenseVector &  gradient 
) const
pure virtual

A measure of the first order optimality conditions.

Parameters
[in]pointPoint which we are querying.
[in]gradientGradient at that point for a given function

If you don't know what to do, then use ||P_C(x - grad) - x|| where x is the point, grad is the gradient and P_C is the projection to the set in consideration.

Implemented in turi::optimization::box_constraints.

◆ is_satisfied()

virtual bool turi::optimization::constraint_interface::is_satisfied ( const DenseVector &  point) const
pure virtual

Boolean function to determine if a dense point is present in a constraint space.

Parameters
[in]pointPoint which we are querying.

Implemented in turi::optimization::box_constraints.

◆ project()

virtual void turi::optimization::constraint_interface::project ( DenseVector &  point) const
pure virtual

Project a dense point into the constraint space.

Parameters
[in,out]pointPoint which we are using to project the point.

Given a convex set X, the projection operator is given by

P(y) = \min_{x \in X} || x - y ||^2

Implemented in turi::optimization::box_constraints.

◆ project_block()

virtual void turi::optimization::constraint_interface::project_block ( DenseVector &  point,
const size_t  block_start,
const size_t  block_size 
) const
pure virtual

Project a dense a block of co-ordinates point into the constraint space.

Parameters
[in,out]pointA block project the point.
[in]block_startStart index of the block
[in]block_sizeSize of the block

Given a convex set X, the projection operator is given by

P(y) = \min_{x \in X} || x - y ||^2

Implemented in turi::optimization::box_constraints.


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