class_docstr: Class for weighting acquisition functions by a prior distribution.
  
  Supports MC and batch acquisition functions via
  SampleReducingAcquisitionFunction.
  
  See [Hvarfner2022]_ for details.
docstr: Initialize the prior-guided acquisition function.
  
  Args:
      acq_function: The base acquisition function.
      prior_module: A Module that computes the probability
          (or log probability) for the provided inputs.
          `prior_module.forward` should take a `batch_shape x q`-dim
          tensor of inputs and return a `batch_shape x q`-dim tensor
          of probabilities.
      log: A boolean that should be true if the acquisition function emits a
          log-transformed value and the prior module emits a log probability.
      prior_exponent: The exponent applied to the prior. This can be used
          for example  to decay the effect the prior over time as in
          [Hvarfner2022]_.
      X_pending: `n x d` Tensor with `n` `d`-dim design points that have
          been submitted for evaluation but have not yet been evaluated.
docstr_tok: ["Initialize","the","prior-guided","acquisition","function",".","Args",":","acq_function",":","The","base","acquisition","function",".","prior_module",":","A","Module","that","computes","the","probability","(","or","log","probability",")","for","the","provided","inputs",".","`","prior_module.forward","`","should","take","a","`","batch_shape","x","q","`","-dim","tensor","of","inputs","and","return","a","`","batch_shape","x","q","`","-dim","tensor","of","probabilities",".","log",":","A","boolean","that","should","be","true","if","the","acquisition","function","emits","a","log-transformed","value","and","the","prior","module","emits","a","log","probability",".","prior_exponent",":","The","exponent","applied","to","the","prior",".","This","can","be","used","for","example","to","decay","the","effect","the","prior","over","time","as","in","[","Hvarfner2022","]","_.","X_pending",":","`","n","x","d","`","Tensor","with","`","n","`","`","d","`","-dim","design","points","that","have","been","submitted","for","evaluation","but","have","not","yet","been","evaluated","."]
code: def __init__(
      self,
      acq_function: AcquisitionFunction,
      prior_module: Module,
      log: bool = False,
      prior_exponent: float = 1.0,
      X_pending: Optional[Tensor] = None,
  ) -> None:
      r"""Initialize the prior-guided acquisition function.
  
      Args:
          acq_function: The base acquisition function.
          prior_module: A Module that computes the probability
              (or log probability) for the provided inputs.
              `prior_module.forward` should take a `batch_shape x q`-dim
              tensor of inputs and return a `batch_shape x q`-dim tensor
              of probabilities.
          log: A boolean that should be true if the acquisition function emits a
              log-transformed value and the prior module emits a log probability.
          prior_exponent: The exponent applied to the prior. This can be used
              for example  to decay the effect the prior over time as in
              [Hvarfner2022]_.
          X_pending: `n x d` Tensor with `n` `d`-dim design points that have
              been submitted for evaluation but have not yet been evaluated.
      """
      super().__init__(model=acq_function.model)
      self.acq_func = acq_function
      self.prior_module = prior_module
      self._log = log
      self._prior_exponent = prior_exponent
      self._is_sample_reducing_af = isinstance(
          acq_function, SampleReducingMCAcquisitionFunction
      )
      self.set_X_pending(X_pending=X_pending)
  
file_path: botorch/botorch/acquisition/prior_guided.py
imports: from __future__ import annotations
  from typing import Optional
  from botorch.acquisition.acquisition import AcquisitionFunction
  from botorch.acquisition.monte_carlo import SampleReducingMCAcquisitionFunction
  from botorch.utils.transforms import concatenate_pending_points, t_batch_mode_transform
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new PriorGuidedAcquisitionFunction object from inherited base classes: AcquisitionFunction with example: obj = PriorGuidedAcquisitionFunction(acq_function, prior_module, log, prior_exponent, X_pending)