CombinationOptimizationContextStopAtIntermediateIteration Method |
Namespace: Novacta.Analytics.Advanced
protected override bool StopAtIntermediateIteration( int iteration, LinkedList<double> levels, LinkedList<DoubleMatrix> parameters )
Exception | Condition |
---|---|
ArgumentNullException | levels is null. -or- parameters is null. |
At intermediate iterations, the algorithm will stop under the following conditions.
A CombinationOptimizationContext never stops before executing a number of iterations less than MinimumNumberOfIterations, and always stops if such number is greater than or equal to MaximumNumberOfIterations.
For intermediate iterations, method StopAtIntermediateIteration(Int32, LinkedListDouble, LinkedListDoubleMatrix) is called to check if a Cross-Entropy program executing in this context should stop or not.
In a CombinationOptimizationContext, the method
analyzes the currently updated reference parameter,
say as follows.
Let be
MinimumNumberOfIterations,
and defines as the set of indexes
in corresponding to its largest probabilities,
where is CombinationDimension.
If condition
can be verified,
the method returns true; otherwise false is returned.
The algorithm thus converges if the indexes of
the largest probabilities coincide
times in a row of iterations.