mlpack
|
Implementation of the OrthogonalRegularizer. More...
#include <orthogonal_regularizer.hpp>
Public Member Functions | |
OrthogonalRegularizer (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). | |
Public Attributes | |
double | factor |
The constant for the regularization. | |
Implementation of the OrthogonalRegularizer.
Orthogonality of weights is a desirable property because multiplication by an orthogonal matrix leaves the norm of the matrix unchanged. The orthogonal regularization technique encourages weights to be orthogonal.
For more information, see the following.
mlpack::ann::OrthogonalRegularizer::OrthogonalRegularizer | ( | double | factor = 1.0 | ) |
Create the regularizer object.
factor | The factor for regularization. |
void mlpack::ann::OrthogonalRegularizer::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. |