Show / Hide Table of Contents

Class CostFunction

Implements a CostFunction when overridden in a derived class.

Inheritance
System.Object
CostFunction
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:numl.Math.Functions.Cost
Assembly:numl.dll
Syntax
public abstract class CostFunction : ICostFunction

Properties

View Source

Lambda

Gets or sets the weight decay (lambda) parameter.

Declaration
public double Lambda { get; set; }
Property Value
Type Description
System.Double
Implements
ICostFunction.Lambda
View Source

Regularizer

Gets or sets the regularization method.

Declaration
public IRegularizer Regularizer { get; set; }
Property Value
Type Description
IRegularizer
Implements
ICostFunction.Regularizer
View Source

X

Gets or sets the input matrix.

Declaration
public Matrix X { get; set; }
Property Value
Type Description
Matrix
Implements
ICostFunction.X
View Source

Y

Gets or sets the output for each row in X.

Declaration
public Vector Y { get; set; }
Property Value
Type Description
Vector
Implements
ICostFunction.Y

Methods

View Source

ComputeCost(Vector)

Computes the cost of the current theta parameters against the known Y labels.

Declaration
public abstract double ComputeCost(Vector theta)
Parameters
Type Name Description
Vector theta
Returns
Type Description
System.Double
Implements
ICostFunction.ComputeCost(Vector)
View Source

ComputeGradient(Vector)

Computes the current gradient step direction towards the minima.

Declaration
public abstract Vector ComputeGradient(Vector theta)
Parameters
Type Name Description
Vector theta
Returns
Type Description
Vector
Implements
ICostFunction.ComputeGradient(Vector)
View Source

Initialize()

Initialization method for performing custom actions prior to being optimized.

Declaration
public virtual void Initialize()
Implements
ICostFunction.Initialize()
  • View Source
©2017 — Seth Juarez
numl v0.9.20-beta
MIT License
docs by docfx