CrossEntropy

The Boulder Opal Toolkits are currently in beta phase of development. Breaking changes may be introduced.

class CrossEntropy(elite_fraction, seed=None)

The cross-entropy optimizer.

Parameters
  • elite_fraction (float) – The top fraction of test points that the algorithm uses to generate the next distribution. Must be between 0 and 1.

  • seed (int, optional) – Seed for the random number generator. Use this option to generate deterministic results from the optimizer.

Notes

The cross-entropy optimizer first fits a normal distribution to an elite_fraction of the given test points with the lowest cost function value. This normal distribution is then sampled to produce a new set of test points. Once all test points have converged, the optimization has converged and will no longer explore.

Note that this optimizer requires at least \(\lceil 2 / \mathrm{elite}\_\mathrm{fraction} \rceil\) results each step, to have at least 2 surviving elite points, and will throw an error if you don’t provide enough initial_test_parameters.

For best results, sample the initial test points from parameter space, varying each axis with each point. This optimizer will reject optimizations where all test points in the initial step are identical.

For more detail on the cross-entropy optimizer see cross-entropy method on Wikipedia.

Methods

create_optimizer

Return the initialized optimizer.