ContinuousOptimizationContext Constructor

Initializes a new instance of the ContinuousOptimizationContext class aimed to optimize the specified continuous function, with the given initial guess argument, optimization goal, range of iterations, and smoothing coefficients.

Definition

Namespace: Novacta.Analytics.Advanced
Assembly: Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.1.0+428f3840cfab98dda567bb0ed350b302533e273a
C#
public ContinuousOptimizationContext(
	Func<DoubleMatrix, double> objectiveFunction,
	DoubleMatrix initialArgument,
	double meanSmoothingCoefficient,
	double standardDeviationSmoothingCoefficient,
	int standardDeviationSmoothingExponent,
	double initialStandardDeviation,
	double terminationTolerance,
	OptimizationGoal optimizationGoal,
	int minimumNumberOfIterations,
	int maximumNumberOfIterations
)

Parameters

objectiveFunction  Func<DoubleMatrix, Double>
The function to be optimized.
initialArgument  DoubleMatrix
The means of the Cross-Entropy parameter initially exploited to sample arguments of the function while searching for the optimal one.
meanSmoothingCoefficient  Double
A coefficient to define the smoothing scheme for the means of the Cross-Entropy parameters exploited by this context.
standardDeviationSmoothingCoefficient  Double
The coefficient that defines the base smoothing scheme for the standard deviations of the Cross-Entropy parameters exploited by this context.
standardDeviationSmoothingExponent  Int32
The exponent that defines the dynamic smoothing scheme for the standard deviations of the Cross-Entropy parameters exploited by this context.
initialStandardDeviation  Double
The value assigned to each standard deviation in the initial Cross-Entropy parameter exploited by this context.
terminationTolerance  Double
The minimal value which, if greater than all the standard deviations of a Cross-Entropy parameter, signals that the optimization must be considered as converged at intermediate iterations.
optimizationGoal  OptimizationGoal
A constant to specify if the function must be minimized or maximized.
minimumNumberOfIterations  Int32
The minimum number of iterations required by this context.
maximumNumberOfIterations  Int32
The maximum number of iterations allowed by this context.

Remarks

It is assumed that the objectiveFunction will accept row vectors as valid representations of an argument. As a consequence, initialArgument is expected to be a row vector.

As discussed by Rubinstein and Kroese, Remark 5.2, p. 189[1], typical values for meanSmoothingCoefficient are between .7 and 1 (excluded), while standardDeviationSmoothingCoefficient should be between .8 and 1 (excluded), with standardDeviationSmoothingExponent between 5 and 10.

Also, it is expected that initialStandardDeviation is a big enough number, such as 100.0. In this way, during the first execution of the sampling step, each argument will have a good likelihood of being drawn.

Exceptions

ArgumentNullExceptionobjectiveFunction is null.
-or-
initialArgument is null.
ArgumentExceptionoptimizationGoal is not a field of OptimizationGoal.
-or-
initialArgument is not a row vector.
-or-
minimumNumberOfIterations is greater than maximumNumberOfIterations.
ArgumentOutOfRangeExceptionmeanSmoothingCoefficient is not in the open interval between 0 and 1.
-or-
standardDeviationSmoothingCoefficient is not in the open interval between 0 and 1.
-or-
standardDeviationSmoothingExponent is not positive.
-or-
initialStandardDeviation is not positive.
-or-
terminationTolerance is not positive.
-or-
minimumNumberOfIterations is not positive.
-or-
maximumNumberOfIterations is not positive.

Bibliography

[1] Rubinstein, R.Y. and Kroese, D.P., The Cross-Entropy Method, A unified Approach to Combinatorial Optimization, Monte-Carlo Simulation, and Machine Learning, Springer, New York. (2004)

See Also