class_docstr: Abstract base class for acquisition functions based on Max-value Entropy Search.
  
  This class provides the basic building blocks for constructing max-value
  entropy-based acquisition functions along the lines of [Wang2017mves]_.
  
  Subclasses need to implement `_sample_max_values` and _compute_information_gain`
  methods.
  
  :meta private:
docstr: Single-outcome max-value entropy search-based acquisition functions.
  
  Args:
      model: A fitted single-outcome model.
      num_mv_samples: Number of max value samples.
      posterior_transform: A PosteriorTransform. If using a multi-output model,
          a PosteriorTransform that transforms the multi-output posterior into a
          single-output posterior is required.
      maximize: If True, consider the problem a maximization problem.
      X_pending: A `m x d`-dim Tensor of `m` design points that have been
          submitted for function evaluation but have not yet been evaluated.
docstr_tok: ["Single-outcome","max-value","entropy","search-based","acquisition","functions",".","Args",":","model",":","A","fitted","single-outcome","model",".","num_mv_samples",":","Number","of","max","value","samples",".","posterior_transform",":","A","PosteriorTransform",".","If","using","a","multi-output","model",",","a","PosteriorTransform","that","transforms","the","multi-output","posterior","into","a","single-output","posterior","is","required",".","maximize",":","If","True",",","consider","the","problem","a","maximization","problem",".","X_pending",":","A","`","m","x","d","`","-dim","Tensor","of","`","m","`","design","points","that","have","been","submitted","for","function","evaluation","but","have","not","yet","been","evaluated","."]
code: def __init__(
      self,
      model: Model,
      num_mv_samples: int,
      posterior_transform: Optional[PosteriorTransform] = None,
      maximize: bool = True,
      X_pending: Optional[Tensor] = None,
  ) -> None:
      r"""Single-outcome max-value entropy search-based acquisition functions.
  
      Args:
          model: A fitted single-outcome model.
          num_mv_samples: Number of max value samples.
          posterior_transform: A PosteriorTransform. If using a multi-output model,
              a PosteriorTransform that transforms the multi-output posterior into a
              single-output posterior is required.
          maximize: If True, consider the problem a maximization problem.
          X_pending: A `m x d`-dim Tensor of `m` design points that have been
              submitted for function evaluation but have not yet been evaluated.
      """
      super().__init__(model=model)
  
      if posterior_transform is None and model.num_outputs != 1:
          raise UnsupportedError(
              "Must specify a posterior transform when using a multi-output model."
          )
  
      # Batched GP models are not currently supported
      try:
          batch_shape = model.batch_shape
      except NotImplementedError:
          batch_shape = torch.Size()
      if len(batch_shape) > 0:
          raise NotImplementedError(
              "Batched GP models (e.g., fantasized models) are not yet "
              f"supported by `{self.__class__.__name__}`."
          )
      self.num_mv_samples = num_mv_samples
      self.posterior_transform = posterior_transform
      self.maximize = maximize
      self.weight = 1.0 if maximize else -1.0
      self.set_X_pending(X_pending)
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from math import log
  from typing import Any, Callable, Optional
  import numpy
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction, MCSamplerMixin
  from botorch.acquisition.cost_aware import CostAwareUtility, InverseCostWeightedUtility
  from botorch.acquisition.objective import PosteriorTransform
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.cost import AffineFidelityCostModel
  from botorch.models.model import Model
  from botorch.models.utils import check_no_nans
  from botorch.sampling.normal import SobolQMCNormalSampler
  from botorch.utils.transforms import match_batch_shape, t_batch_mode_transform
  from linear_operator.functions import inv_quad
  from linear_operator.utils.cholesky import psd_safe_cholesky
  from scipy.optimize import brentq
  from scipy.stats import norm
  from torch import Tensor
label_desc: Use image node_id 1 to create a new MaxValueBase object from inherited base classes: AcquisitionFunction, ABC with example: obj = MaxValueBase(model, num_mv_samples, posterior_transform, maximize, X_pending)