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

#include <ml/optimization/regularizer_interface.hpp>

Public Member Functions

bool is_smooth ()
 
virtual ~smooth_regularizer_interface ()
 
virtual void compute_hessian (const DenseVector &point, DiagonalMatrix &hessian) const =0
 
virtual double compute_function_value (const DenseVector &point) const =0
 
virtual void compute_gradient (const DenseVector &point, DenseVector &gradient) const =0
 
virtual void apply_proximal_operator (DenseVector &point, const double &_penalty=0) const =0
 

Detailed Description

Interface for regularizers that separable and smooth.

Definition at line 105 of file regularizer_interface.hpp.

Constructor & Destructor Documentation

◆ ~smooth_regularizer_interface()

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

Default desctuctor.

Definition at line 118 of file regularizer_interface.hpp.

Member Function Documentation

◆ apply_proximal_operator()

virtual void turi::optimization::regularizer_interface::apply_proximal_operator ( DenseVector &  point,
const double &  _penalty = 0 
) const
pure virtualinherited

Compute the proximal operator for the regularizer at a given point.

Parameters
[in,out]pointPoint at which we are computing the gradient.
[in]penaltyPenalty parameters.
Note
The proximal operator for a convex function f(.) at the point x is defined as prox_f(x) = argmin_v ( f(v) + 0.5 * penalty ||x-v||^2) The idea is an old concept in optimization but it well explained in (1).

References:

(1) Parikh, Neal, and Stephen Boyd. "Foundations and Trends in Optimization." (2014).

Implemented in turi::optimization::elastic_net, turi::optimization::l1_norm, and turi::optimization::l2_norm.

◆ compute_function_value()

virtual double turi::optimization::regularizer_interface::compute_function_value ( const DenseVector &  point) const
pure virtualinherited

Compute the function value of the regularizer at a given point.

Parameters
[in]pointPoint at which we are computing the gradient.

Implemented in turi::optimization::elastic_net, turi::optimization::l1_norm, and turi::optimization::l2_norm.

◆ compute_gradient()

virtual void turi::optimization::regularizer_interface::compute_gradient ( const DenseVector &  point,
DenseVector &  gradient 
) const
pure virtualinherited

Compute the gradient (or subgradient) at the given point.

Parameters
[in]pointPoint at which we are computing the gradient.
[out]gradientDense gradient

Implemented in turi::optimization::elastic_net, turi::optimization::l1_norm, and turi::optimization::l2_norm.

◆ compute_hessian()

virtual void turi::optimization::smooth_regularizer_interface::compute_hessian ( const DenseVector &  point,
DiagonalMatrix &  hessian 
) const
pure virtual

Compute the hessian of the regularizer at a given point.

Parameters
[in]pointPoint at which we are computing the gradient.
[in,out]hessianDiagonal matrix as the hessian gradient.

Implemented in turi::optimization::l2_norm.

◆ is_smooth()

bool turi::optimization::smooth_regularizer_interface::is_smooth ( )
inline

Function to determine if the regularizer is smooth.

Returns
true

Definition at line 113 of file regularizer_interface.hpp.


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