Interface ICostFunction
Cost function interface
Namespace:numl.Math.Functions.Cost
Assembly:numl.dll
Syntax
public interface ICostFunction
Properties
View SourceLambda
Gets or sets the weight decay (lambda) parameter.
Declaration
double Lambda { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Regularizer
Gets or sets the regularization method.
Declaration
IRegularizer Regularizer { get; set; }
Property Value
| Type | Description |
|---|---|
| IRegularizer |
X
Gets or sets te input matrix.
Declaration
Matrix X { get; set; }
Property Value
| Type | Description |
|---|---|
| Matrix |
Y
Gets or sets the output for each row in X.
Declaration
Vector Y { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector |
Methods
View SourceComputeCost(Vector)
Computes the cost of the current theta parameters against the known Y labels
Declaration
double ComputeCost(Vector theta)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector | theta |
Returns
| Type | Description |
|---|---|
| System.Double |
ComputeGradient(Vector)
Computes the current gradient step direction towards the minima
Declaration
Vector ComputeGradient(Vector theta)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector | theta |
Returns
| Type | Description |
|---|---|
| Vector |
Initialize()
Initialization method for performing custom actions prior to being optimized.
Declaration
void Initialize()