Click or drag to resize

ParameterOptimizer.CheckCostFunctionConvergence 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: 25.1.421.0 (25.1.421.0)
Syntax
public static bool CheckCostFunctionConvergence(
	CostFunctionSettings costFunction,
	double? currentCostFunctionValue,
	double? previousCostFunctionValue
)

Parameters

costFunction
Type: AGI.Foundation.NumericalMethods.CostFunctionSettings
The cost function to be optimized.
currentCostFunctionValue
Type: System.Nullable<Double>
The value of the cost function for the current iteration.
previousCostFunctionValue
Type: System.Nullable<Double>
The value of the cost function for the previous iteration.

Return Value

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