class_docstr: A function measuring the quality of input points as their expected
  improvement with respect to a conservative baseline. Expectations
  are according to the model from the previous BO step. See [moss2023ipa]_
  for details and justification.
docstr: Args:
      model: The model fitted during the previous BO step. For now, this
          must be a single task model (i.e. num_outputs=1).
      maximize: Set True if we are performing function maximization, else
          set False.
docstr_tok: ["Args",":","model",":","The","model","fitted","during","the","previous","BO","step",".","For","now",",","this","must","be","a","single","task","model","(","i.e",".","num_outputs=1",")",".","maximize",":","Set","True","if","we","are","performing","function","maximization",",","else","set","False","."]
code: def __init__(self, model: Model, maximize: bool):
      r"""
      Args:
          model: The model fitted during the previous BO step. For now, this
              must be a single task model (i.e. num_outputs=1).
          maximize: Set True if we are performing function maximization, else
              set False.
      """
      if model.num_outputs != 1:
          raise NotImplementedError(
              "Multi-output models are currently not supported. "
          )
      self._model = model
      self._maximize = maximize
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from typing import Union
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.model import Model
  from botorch.utils.probability.utils import ndtr, phi
  from gpytorch.module import Module
  from linear_operator.operators import LinearOperator
  from torch import Tensor
label_desc: Use image node_id 1 to create a new ExpectedImprovementQualityFunction object from inherited base classes: QualityFunction with example: obj = ExpectedImprovementQualityFunction(model, maximize)