Turi Create
4.0
|
#include <ml/optimization/regularizers-inl.hpp>
Public Member Functions | |
l2_norm (const DenseVector &_lambda) | |
~l2_norm () | |
void | compute_hessian (const DenseVector &point, DiagonalMatrix &hessian) const |
double | compute_function_value (const DenseVector &point) const |
void | compute_gradient (const DenseVector &point, DenseVector &gradient) const |
void | apply_proximal_operator (DenseVector &point, const double &_penalty=0) const |
bool | is_smooth () |
Protected Attributes | |
DenseVector | lambda |
size_t | variables |
Interface for the regularizer (Scaled L2-norm)
f(x) = \sum_{i} lambda_i * x_i^2
Definition at line 42 of file regularizers-inl.hpp.
|
inline |
Default constructor.
Definition at line 55 of file regularizers-inl.hpp.
|
inline |
Default desctuctor. Do nothing.
Definition at line 63 of file regularizers-inl.hpp.
|
inlinevirtual |
Compute the proximal operator for the l2-regularizer
[in,out] | point | Point at which we are computing the gradient. |
[in] | penalty | Penalty |
Implements turi::optimization::regularizer_interface.
Definition at line 112 of file regularizers-inl.hpp.
|
inlinevirtual |
Compute the function value of the regularizer at a given point.
[in] | point | Point at which we are computing the gradient. |
Implements turi::optimization::regularizer_interface.
Definition at line 82 of file regularizers-inl.hpp.
|
inlinevirtual |
Compute the gradient (or subgradient) at the given point.
[in] | point | Point at which we are computing the gradient. |
[out] | gradient | Dense gradient |
Implements turi::optimization::regularizer_interface.
Definition at line 95 of file regularizers-inl.hpp.
|
inlinevirtual |
Compute the hessian of the regularizer at a given point.
[in] | point | Point at which we are computing the gradient. |
[in,out] | hessian | Diagonal matrix as the hessian gradient. |
Implements turi::optimization::smooth_regularizer_interface.
Definition at line 72 of file regularizers-inl.hpp.
|
inlineinherited |
Function to determine if the regularizer is smooth.
Definition at line 113 of file regularizer_interface.hpp.
|
protected |
Penalty on the regularizer
Definition at line 46 of file regularizers-inl.hpp.
|
protected |
Definition at line 47 of file regularizers-inl.hpp.