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

#include <ml/optimization/constraints-inl.hpp>

Public Member Functions

 non_negative_orthant (const size_t &_variables)
 
 ~non_negative_orthant ()
 
void project (DenseVector &point) const
 
void project_block (DenseVector &point, const size_t block_start, const size_t block_size) const
 
bool is_satisfied (const DenseVector &point) const
 
double first_order_optimality_conditions (const DenseVector &point, const DenseVector &gradient) const
 
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
 

Protected Attributes

size_t variables
 

Detailed Description

Interface for non-negative constriants. x >= 0

Definition at line 40 of file constraints-inl.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 virtualinherited

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 virtualinherited

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 virtualinherited

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 virtualinherited

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: