class_docstr: A sequential domain reduction transformer based on the work by Stander, N. and Craig, K:
  "On the robustness of a simple domain reduction scheme for simulation‐based optimization"
class_docstr_tok: ["A","sequential","domain","reduction","transformer","based","on","the","work","by","Stander",",","N.","and","Craig",",","K",":","''","On","the","robustness","of","a","simple","domain","reduction","scheme","for","simulation\u2010based","optimization","''"]
docstr: Initialize all of the parameters.
          
docstr_tok: ["Initialize","all","of","the","parameters","."]
code: def initialize(self, target_space: TargetSpace) -> None:
      """Initialize all of the parameters."""
  
      # Set the original bounds
      self.original_bounds = np.copy(target_space.bounds)
      self.bounds = [self.original_bounds]
  
      # Set the minimum window to an array of length bounds
      if isinstance(self.minimum_window_value, list) or isinstance(
          self.minimum_window_value, np.ndarray
      ):
          assert len(self.minimum_window_value) == len(
              target_space.bounds
          )
          self.minimum_window = self.minimum_window_value
      else:
          self.minimum_window = [self.minimum_window_value] * len(
              target_space.bounds
          )
  
      # Set initial values
      self.previous_optimal = np.mean(target_space.bounds, axis=1)
      self.current_optimal = np.mean(target_space.bounds, axis=1)
      self.r = target_space.bounds[:, 1] - target_space.bounds[:, 0]
  
      self.previous_d = (
          2.0 * (self.current_optimal - self.previous_optimal) / self.r
      )
  
      self.current_d = (
          2.0 * (self.current_optimal - self.previous_optimal) / self.r
      )
  
      self.c = self.current_d * self.previous_d
      self.c_hat = np.sqrt(np.abs(self.c)) * np.sign(self.c)
  
      self.gamma = 0.5 * (
          self.gamma_pan * (1.0 + self.c_hat)
          + self.gamma_osc * (1.0 - self.c_hat)
      )
  
      self.contraction_rate = self.eta + np.abs(self.current_d) * (
          self.gamma - self.eta
      )
  
      self.r = self.contraction_rate * self.r
  
      # check if the minimum window fits in the original bounds
      self._window_bounds_compatibility(self.original_bounds)
  
file_path: BayesianOptimization/bayes_opt/domain_reduction.py
imports: from typing import Optional, Union, List
  import numpy
  from .target_space import TargetSpace
  from warnings import warn
label_desc: Use image node_id 2 for calling the SequentialDomainReductionTransformer obj's underlying member method code with example usage: obj.initialize(target_space) without return types