Class ElasticNetRegularizer
- Namespace
- NeuralNetworks.Regularization
- Assembly
- NeuralNetworks.dll
Combines L1 and L2 regularization into a single elastic net regularizer.
public class ElasticNetRegularizer : CompositeRegularizer, IRegularizer
- Inheritance
-
ElasticNetRegularizer
- Implements
- Inherited Members
Remarks
Uses separate L1 and L2 regularizers (L1Regularizer and L2Regularizer) and applies both penalties during training.
Constructors
ElasticNetRegularizer(float, float, bool)
Combines L1 and L2 regularization into a single elastic net regularizer.
public ElasticNetRegularizer(float l1, float l2, bool reportPenaltyInLoss = false)
Parameters
l1floatL1 regularization coefficient.
l2floatL2 regularization coefficient.
reportPenaltyInLossboolIndicates whether the regularization penalty is included in the reported loss value.
Remarks
Uses separate L1 and L2 regularizers (L1Regularizer and L2Regularizer) and applies both penalties during training.
Properties
L1
public float L1 { get; }
Property Value
L2
public float L2 { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.