optiml.ml.neural_network.regularizers module
- class optiml.ml.neural_network.regularizers.Regularizer(lmbda=0.0)[source]
Bases:
ABCBase abstract class for all regularizers. A regularizer penalizes the magnitude of the parameters and exposes both its
functionand itsjacobian.- Parameters:
lmbda (float, default=0.) – Regularization strength. The higher the value, the stronger the penalty on the parameters.
- class optiml.ml.neural_network.regularizers.L1(lmbda=0.0)[source]
Bases:
RegularizerL1 (Lasso) regularizer:
\[R(\theta) = \lambda \sum \lvert \theta \rvert\]- Parameters:
lmbda (float, default=0.) – Regularization strength.