class_docstr: Interleaves a random configuration according to a given probability which is decreased
  according to a cosine annealing schedule.
  
  Parameters
  ----------
  max_probability : float
      Initial (maximum) probability of a random configuration.
  min_probability : float
      Final (minimal) probability of a random configuration used in iteration `restart_iteration`.
  restart_iteration : int
      Restart the annealing schedule every `restart_iteration` iterations.
  seed : int
      Integer used to initialize random state.
class_docstr_tok: ["Interleaves","a","random","configuration","according","to","a","given","probability","which","is","decreased","according","to","a","cosine","annealing","schedule",".","Parameters","--","--","--","--","--","max_probability",":","float","Initial","(","maximum",")","probability","of","a","random","configuration",".","min_probability",":","float","Final","(","minimal",")","probability","of","a","random","configuration","used","in","iteration","`","restart_iteration","`",".","restart_iteration",":","int","Restart","the","annealing","schedule","every","`","restart_iteration","`","iterations",".","seed",":","int","Integer","used","to","initialize","random","state","."]
code: def __init__(
      self,
      min_probability: float,
      max_probability: float,
      restart_iteration: int,
      seed: int = 0,
  ):
      super().__init__(seed)
      assert 0 <= min_probability <= 1
      assert 0 <= max_probability <= 1
      assert max_probability > min_probability
      assert restart_iteration > 2
      self._max_probability = max_probability
      self._min_probability = min_probability
  
      # Internally, iteration indices start at 0, so we need to decrease this
      self._restart_iteration = restart_iteration - 1
      self._iteration = 0
      self._probability = max_probability
  
file_path: SMAC3/smac/random_design/annealing_design.py
imports: from __future__ import annotations
  from typing import Any
  import numpy
  from smac.random_design.abstract_random_design import AbstractRandomDesign
  from smac.utils.logging import get_logger
label_desc: Use image node_id 1 to create a new CosineAnnealingRandomDesign object from inherited base classes: AbstractRandomDesign with example: obj = CosineAnnealingRandomDesign(min_probability, max_probability, restart_iteration, seed)