Turi Create
4.0
|
#include <ml/optimization/regularizers-inl.hpp>
Public Member Functions | |
l1_norm (const DenseVector &_lambda) | |
~l1_norm () | |
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 L1-norm)
f(x) = \sum_{i} lambda_i * |x_i|
Definition at line 129 of file regularizers-inl.hpp.
|
inline |
Default constructor.
Definition at line 141 of file regularizers-inl.hpp.
|
inline |
Default desctuctor. Do nothing.
Definition at line 149 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 191 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 157 of file regularizers-inl.hpp.
|
inlinevirtual |
Compute the subgradient at the given point.
[in] | point | Point at which we are computing the gradient. |
[out] | gradient | Dense sub-gradient |
Implements turi::optimization::regularizer_interface.
Definition at line 170 of file regularizers-inl.hpp.
|
inlineinherited |
Function to determine if the regularizer is smooth.
Definition at line 56 of file regularizer_interface.hpp.
|
protected |
Penalty on the regularizer
Definition at line 133 of file regularizers-inl.hpp.
|
protected |
Definition at line 134 of file regularizers-inl.hpp.