Click or drag to resize
Accord.NET (logo)

ForwardBackwardGradientTGradient Method (Double, T, Int32)

Computes the gradient (vector of derivatives) vector for the cost function, which may be used to guide optimization.

Namespace:  Accord.Statistics.Models.Fields.Learning
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public double[] Gradient(
	double[] parameters,
	T[][] inputs,
	int[] outputs
)
Request Example View Source

Parameters

parameters
Type: SystemDouble
The parameter vector lambda to use in the model.
inputs
Type: T
The inputs to compute the cost function.
outputs
Type: SystemInt32
The respective outputs to compute the cost function.

Return Value

Type: Double
The value of the gradient vector for the given parameters.
See Also