Generated by DocFX

Class CostFunction

Represents a cost function with vector arguments.

Inheritance
Object
CostFunction
CrossEntropyCost
HuberCost
MSECost
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: NeuralNetLearning.Maths.CostFunctions
Assembly: NeuralNet.dll
Syntax
public abstract class CostFunction

Methods

Apply(Vector<Double>, Vector<Double>)

Returns the numeric cost of the calculated vector predicted vs the target vector expected.

Declaration
public abstract double Apply(Vector<double> predicted, Vector<double> expected)
Parameters
Type Name Description
MathNet.Numerics.LinearAlgebra.Vector<Double> predicted
MathNet.Numerics.LinearAlgebra.Vector<Double> expected
Returns
Type Description
Double

Derivative(Vector<Double>, Vector<Double>)

Returns the vector of derivatives of the cost function with respect to the calculated vector predicted.

Declaration
public abstract Vector<double> Derivative(Vector<double> predicted, Vector<double> expected)
Parameters
Type Name Description
MathNet.Numerics.LinearAlgebra.Vector<Double> predicted
MathNet.Numerics.LinearAlgebra.Vector<Double> expected
Returns
Type Description
MathNet.Numerics.LinearAlgebra.Vector<Double>