Table of Contents

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

l1 float

L1 regularization coefficient.

l2 float

L2 regularization coefficient.

reportPenaltyInLoss bool

Indicates 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

float

L2

public float L2 { get; }

Property Value

float

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.