class_docstr: Analytic Preferential Expected Utility of Best Options, i.e., Analytical EUBO
class_docstr_tok: ["Analytic","Preferential","Expected","Utility","of","Best","Options",",","i.e.",",","Analytical","EUBO"]
docstr: Analytic implementation of Expected Utility of the Best Option under the
  Laplace model (assumes a PairwiseGP is used as the preference model) as
  proposed in [Lin2022preference]_.
  
  Args:
      pref_model: The preference model that maps the outcomes (i.e., Y) to
          scalar-valued utility.
      outcome_model: A deterministic model that maps parameters (i.e., X) to
          outcomes (i.e., Y). The outcome model f defines the search space of
          Y = f(X). If model is None, we are directly calculating EUBO on
          the parameter space. When used with `OneSamplePosteriorDrawModel`,
          we are obtaining EUBO-zeta as described in [Lin2022preference]_.
      previous_winner: Tensor representing the previous winner in the Y space.
docstr_tok: ["Analytic","implementation","of","Expected","Utility","of","the","Best","Option","under","the","Laplace","model","(","assumes","a","PairwiseGP","is","used","as","the","preference","model",")","as","proposed","in","[","Lin2022preference","]","_.","Args",":","pref_model",":","The","preference","model","that","maps","the","outcomes","(","i.e.",",","Y",")","to","scalar-valued","utility",".","outcome_model",":","A","deterministic","model","that","maps","parameters","(","i.e.",",","X",")","to","outcomes","(","i.e.",",","Y",")",".","The","outcome","model","f","defines","the","search","space","of","Y","=","f","(","X",")",".","If","model","is","None",",","we","are","directly","calculating","EUBO","on","the","parameter","space",".","When","used","with","`","OneSamplePosteriorDrawModel","`",",","we","are","obtaining","EUBO-zeta","as","described","in","[","Lin2022preference","]","_.","previous_winner",":","Tensor","representing","the","previous","winner","in","the","Y","space","."]
code: def __init__(
      self,
      pref_model: Model,
      outcome_model: Optional[DeterministicModel] = None,
      previous_winner: Optional[Tensor] = None,
  ) -> None:
      r"""Analytic implementation of Expected Utility of the Best Option under the
      Laplace model (assumes a PairwiseGP is used as the preference model) as
      proposed in [Lin2022preference]_.
  
      Args:
          pref_model: The preference model that maps the outcomes (i.e., Y) to
              scalar-valued utility.
          outcome_model: A deterministic model that maps parameters (i.e., X) to
              outcomes (i.e., Y). The outcome model f defines the search space of
              Y = f(X). If model is None, we are directly calculating EUBO on
              the parameter space. When used with `OneSamplePosteriorDrawModel`,
              we are obtaining EUBO-zeta as described in [Lin2022preference]_.
          previous_winner: Tensor representing the previous winner in the Y space.
      """
      super().__init__(model=pref_model)
      # ensure the model is in eval mode
      self.add_module("outcome_model", outcome_model)
      self.register_buffer("previous_winner", previous_winner)
  
      tkwargs = {
          "dtype": pref_model.datapoints.dtype,
          "device": pref_model.datapoints.device,
      }
      std_norm = torch.distributions.normal.Normal(
          torch.zeros(1, **tkwargs),
          torch.ones(1, **tkwargs),
      )
      self.std_norm = std_norm
  
file_path: botorch/botorch/acquisition/preference.py
imports: from __future__ import annotations
  from typing import Any, Optional
  import torch
  from botorch.acquisition import AnalyticAcquisitionFunction
  from botorch.acquisition.monte_carlo import MCAcquisitionFunction
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.deterministic import DeterministicModel
  from botorch.models.model import Model
  from botorch.utils.transforms import match_batch_shape, t_batch_mode_transform
  from torch import Tensor
  from torch.distributions import Bernoulli, Normal
label_desc: Use image node_id 1 to create a new AnalyticExpectedUtilityOfBestOption object from inherited base classes: AnalyticAcquisitionFunction with example: obj = AnalyticExpectedUtilityOfBestOption(pref_model, outcome_model, previous_winner)