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

#include <ml/optimization/regularizer_interface.hpp>

Public Member Functions

virtual ~regularizer_interface ()
 
bool is_smooth ()
 
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 which are separable but not smooth.

Note
Smooth refers to functions with continuous derivatives of all orders.

Definition at line 42 of file regularizer_interface.hpp.

Constructor & Destructor Documentation

◆ ~regularizer_interface()

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

Default desctuctor.

Definition at line 49 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 virtual

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 virtual

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 virtual

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.

◆ is_smooth()

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

Function to determine if the regularizer is smooth.

Returns
false

Definition at line 56 of file regularizer_interface.hpp.


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