Skip to content
← All questions

How is the iteration threshold γi\gamma_i defined and when does the cross-entropy loop stop?

The iteration threshold γi\gamma_i is defined as the empirical (1−p)(1-p)-quantile of the current batch of samples drawn from the proposal distribution. The loop stops when this threshold γi\gamma_i is greater than or equal to the target rare-event threshold γ\gamma.

Conditions

  • Samples are drawn from the current proposal distribution.
  • The elite fraction parameter pp is set to 0.05.
  • The target threshold is γ=5\gamma=5.

Reasoning, step by step

  1. Draw a batch of samples from the current proposal.
  2. Compute the empirical 95% quantile of these samples to get γi\gamma_i.
  3. Compare γi\gamma_i to the target threshold γ\gamma.
  4. If γi≥γ\gamma_i \ge \gamma, stop the iteration.

Example

The code shows `gamma_i = np.quantile(Xs, 1-p)` and `if gamma_i >= gamma: break` with `p=0.05p = 0.05`. The speaker says the threshold for this iteration is set to be the 95% threshold of the X samples, and if this is above the overall goal of gamma, they stop iterating.

Common misconceptions

  • Assuming γi\gamma_i is a fixed constant throughout the iterations.
  • Thinking the loop stops when the sample mean exceeds γ\gamma.

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.