SystemPerformanceOptimizationContextOnExecutedIteration Method |
Namespace: Novacta.Analytics.Advanced
protected override void OnExecutedIteration( int iteration, DoubleMatrix sample, LinkedList<double> levels, LinkedList<DoubleMatrix> parameters )
In the SystemPerformanceOptimizationContext class, this method calls SmoothParameter(LinkedListDoubleMatrix) to provide a smoothing scheme for Cross-Entropy parameters.
Caution |
---|
When overriding this method, please remember to call its base implementation, or no smoothing scheme will be applied to Cross-Entropy parameters. |
In the following example, a new context class is derived from SystemPerformanceOptimizationContext that needs to override method OnExecutedIteration(Int32, DoubleMatrix, LinkedListDouble, LinkedListDoubleMatrix).
class DerivedContext : SystemPerformanceOptimizationContext { public override void OnExecutedIteration( int iteration, DoubleMatrix sample, LinkedList<double> levels, LinkedList<DoubleMatrix> parameters) { Console.WriteLine("Iteration: {0}", iteration); // Calling the base class OnExecutedIteration method. base.OnExecutedIteration( iteration, sample, levels, parameters); } // Additional code here. }