Turi Create
4.0
|
#include <ml/optimization/regularizers-inl.hpp>
Public Member Functions | |
elastic_net (const DenseVector &_alpha, const DenseVector &_beta) | |
~elastic_net () | |
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 | alpha |
DenseVector | beta |
size_t | variables |
Interface for the elastic net regularizer (Scaled L1-norm)
f(x) = \sum_{i} alpha_i * |x_i| + \sum_{i} beta_i * x_i^2
Definition at line 209 of file regularizers-inl.hpp.
|
inline |
Default constructor.
Definition at line 223 of file regularizers-inl.hpp.
|
inline |
Default desctuctor. Do nothing.
Definition at line 233 of file regularizers-inl.hpp.
|
inlinevirtual |
Compute the proximal operator for the elastic-regularizer
[in,out] | point | Point at which we are computing the gradient. |
[in] | penalty | Penalty |
Implements turi::optimization::regularizer_interface.
Definition at line 277 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 241 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 254 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 l1-regularizer
Definition at line 213 of file regularizers-inl.hpp.
|
protected |
Penalty on the l2-regularizer
Definition at line 214 of file regularizers-inl.hpp.
|
protected |
Definition at line 215 of file regularizers-inl.hpp.