Interface IRegularizer
Regularization function
Namespace:numl.Math.Functions.Regularization
Assembly:numl.dll
Syntax
public interface IRegularizer
Methods
View SourceRegularize(Vector, Vector, Int32, Double)
Applies regularization to the current gradient
Declaration
Vector Regularize(Vector gradient, Vector theta, int m, double lambda)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector | gradient | Current gradient |
| Vector | theta | Current theta |
| System.Int32 | m | Number of training records |
| System.Double | lambda | Regularization constant |
Returns
| Type | Description |
|---|---|
| Vector |
Regularize(Double, Vector, Int32, Double)
Applies regularization to the current cost
Declaration
double Regularize(double j, Vector theta, int m, double lambda)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | j | Current cost |
| Vector | theta | Current theta |
| System.Int32 | m | Number of training records |
| System.Double | lambda | Regularization constant |
Returns
| Type | Description |
|---|---|
| System.Double |