The L_p regularizer for arbitrary integer p. More...
Public Member Functions | |
LRegularizer (double factor=1.0) | |
Create the regularizer object. More... | |
template < typename MatType > | |
void | Evaluate (const MatType &weight, MatType &gradient) |
Calculate the gradient for regularization. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the regularizer (nothing to do). More... | |
Public Attributes | |
double | factor |
The constant for the regularization. More... | |
Static Public Attributes | |
static const int | Power = TPower |
The power of the regularizer. More... | |
The L_p regularizer for arbitrary integer p.
Power | Power of regularizer; i.e. Power = 1 gives the L1-regularization. |
Definition at line 27 of file lregularizer.hpp.
LRegularizer | ( | double | factor = 1.0 | ) |
Create the regularizer object.
factor | The factor for regularization. |
void Evaluate | ( | const MatType & | weight, |
MatType & | gradient | ||
) |
Calculate the gradient for regularization.
MatType | Type of weight matrix. |
weight | The weight matrix to be regularized. |
gradient | The calculated gradient. |
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the regularizer (nothing to do).
double factor |
The constant for the regularization.
Definition at line 55 of file lregularizer.hpp.
|
static |
The power of the regularizer.
Definition at line 52 of file lregularizer.hpp.