pypomp.RWSigma.cosine_cooling

RWSigma.cosine_cooling(c: float, M: int) RWSigma[source]

Return a copy of this instance using cosine annealing cooling.

The cooling factor at progress p = (nt / ntimes + m) / M is:

\[\text{factor} = c + (1-c) \cdot 0.5 \cdot (1 + \cos(\pi p))\]
Parameters:
  • c (float) – Minimum cooling factor reached at p >= 1. Must be in the interval \([0, 1]\).

  • M (int) – Number of iterations over which the cosine schedule is defined. Typically set to the total number of IF2 iterations. Must be positive.

Returns:

A new RWSigma instance with cosine cooling configured.

Return type:

RWSigma