Click or drag to resize

ParameterOptimizerCheckCostFunctionConvergence Method

A helper method to determine if the cost function changed by less than its Tolerance in the last iteration.

Namespace:  AGI.Foundation.NumericalMethods
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public static bool CheckCostFunctionConvergence(
	CostFunctionSettings costFunction,
	double? currentCostFunctionValue,
	double? previousCostFunctionValue
)

Parameters

costFunction
Type: AGI.Foundation.NumericalMethodsCostFunctionSettings
The cost function to be optimized.
currentCostFunctionValue
Type: SystemNullableDouble
The value of the cost function for the current iteration.
previousCostFunctionValue
Type: SystemNullableDouble
The value of the cost function for the previous iteration.

Return Value

Type: Boolean
if the cost function changed by less than its tolerance or if one of the cost function values is ; otherwise .
See Also