class_docstr: Class for Local Penalization acquisition. Used for batch design.
  :param model: model of the class GPyOpt
  :param space: design space of the class GPyOpt.
  :param optimizer: optimizer of the class GPyOpt.
  :param acquisition: acquisition function of the class GPyOpt
  :param transform: transformation applied to the acquisition (default, none).
  
  .. Note:: irrespective of the transformation applied the penalized acquisition is always mapped again to the log space.
  This way gradients can be computed additively and are more stable.
class_docstr_tok: ["Class","for","Local","Penalization","acquisition",".","Used","for","batch","design",".",":","param","model",":","model","of","the","class","GPyOpt",":","param","space",":","design","space","of","the","class","GPyOpt",".",":","param","optimizer",":","optimizer","of","the","class","GPyOpt",".",":","param","acquisition",":","acquisition","function","of","the","class","GPyOpt",":","param","transform",":","transformation","applied","to","the","acquisition","(","default",",","none",")",".","..","Note",":",":","irrespective","of","the","transformation","applied","the","penalized","acquisition","is","always","mapped","again","to","the","log","space",".","This","way","gradients","can","be","computed","additively","and","are","more","stable","."]
docstr: Creates a penalized acquisition function using 'hammer' functions around the points collected in the batch
  
  .. Note:: the penalized acquisition is always mapped to the log space. This way gradients can be computed additively and are more stable.
docstr_tok: ["Creates","a","penalized","acquisition","function","using","'hammer","'","functions","around","the","points","collected","in","the","batch","..","Note",":",":","the","penalized","acquisition","is","always","mapped","to","the","log","space",".","This","way","gradients","can","be","computed","additively","and","are","more","stable","."]
code: def _penalized_acquisition(self, x, model, X_batch, r_x0, s_x0):
      """
      Creates a penalized acquisition function using 'hammer' functions around the points collected in the batch
  
      .. Note:: the penalized acquisition is always mapped to the log space. This way gradients can be computed additively and are more stable.
      """
      fval = -self.acq.acquisition_function(x)[:, 0]
  
      if self.transform == "softplus":
          fval_org = fval.copy()
          fval[fval_org >= 40.0] = np.log(fval_org[fval_org >= 40.0])
          fval[fval_org < 40.0] = np.log(
              np.log1p(np.exp(fval_org[fval_org < 40.0]))
          )
      elif self.transform == "none":
          fval = np.log(fval + 1e-50)
  
      fval = -fval
      if X_batch is not None:
          h_vals = self._hammer_function(x, X_batch, r_x0, s_x0)
          fval += -h_vals.sum(axis=-1)
      return fval
  
file_path: GPyOpt/GPyOpt/acquisitions/LP.py
imports: from .base import AcquisitionBase
  from .LCB import AcquisitionLCB
  from .LCB_mcmc import AcquisitionLCB_MCMC
  import numpy
  from scipy.stats import norm
label_desc: Use image node_id 5 for calling the AcquisitionLP obj's underlying member method code with example usage: obj._penalized_acquisition(x, model, X_batch, r_x0, s_x0) and returns: fval