class_docstr: Given several functions, and threshold on their values (above which solutions are pointless),
  this object can be used as a single-objective function, the minimization of which
  yields a solution to the original multiobjective problem.
  
  Parameters
  -----------
  upper_bounds: Tuple of float or np.ndarray
      upper_bounds[i] is a threshold above which x is pointless if function(x)[i] > upper_bounds[i].
  auto_bound: int
      if no upper bounds are provided, number of initial points used to estimate the upper bounds. Their
      loss will be 0 (except if they are uniformly worse than the previous points).
  seed: optional int or RandomState
      seed to use for selecting random subsamples of the pareto
  no_hypervolume: bool
      Most optimizers are designed for single objective and use a float loss.
      To use these in a multi-objective optimization, we provide the negative of
      the hypervolume of the pareto front as the loss.
      If not needed, an optimizer can set this to True.
  
  Notes
  -----
  When no_hypervolume is false:
  - This function is not stationary!
  - The minimum value obtained for this objective function is -h,
    where h is the hypervolume of the Pareto front obtained, given upper_bounds as a reference point.
  - The callable keeps track of the pareto_front (see attribute paretor_front) and is therefor stateful.
    For this reason it cannot be distributed. A user can however call the multiobjective_function
    remotely, and aggregate locally. This is what happens in the "minimize" method of optimizers.
  when no_hypervolume is true:
  - Hypervolume isn't used at all!
  - We simply add every point to the pareto front and state that the pareto front needs to be filtered.
  - The Pareto front is lazily kept up to date because every time you call pareto_front()
    an algorithm is performed that filters the pareto front into what it should be.
class_docstr_tok: ["Given","several","functions",",","and","threshold","on","their","values","(","above","which","solutions","are","pointless",")",",","this","object","can","be","used","as","a","single-objective","function",",","the","minimization","of","which","yields","a","solution","to","the","original","multiobjective","problem",".","Parameters","--","--","--","--","--","-","upper_bounds",":","Tuple","of","float","or","np.ndarray","upper_bounds","[","i","]","is","a","threshold","above","which","x","is","pointless","if","function","(","x",")","[","i","]",">","upper_bounds","[","i","]",".","auto_bound",":","int","if","no","upper","bounds","are","provided",",","number","of","initial","points","used","to","estimate","the","upper","bounds",".","Their","loss","will","be","0","(","except","if","they","are","uniformly","worse","than","the","previous","points",")",".","seed",":","optional","int","or","RandomState","seed","to","use","for","selecting","random","subsamples","of","the","pareto","no_hypervolume",":","bool","Most","optimizers","are","designed","for","single","objective","and","use","a","float","loss",".","To","use","these","in","a","multi-objective","optimization",",","we","provide","the","negative","of","the","hypervolume","of","the","pareto","front","as","the","loss",".","If","not","needed",",","an","optimizer","can","set","this","to","True",".","Notes","--","--","-","When","no_hypervolume","is","false",":","-","This","function","is","not","stationary","!","-","The","minimum","value","obtained","for","this","objective","function","is","-h",",","where","h","is","the","hypervolume","of","the","Pareto","front","obtained",",","given","upper_bounds","as","a","reference","point",".","-","The","callable","keeps","track","of","the","pareto_front","(","see","attribute","paretor_front",")","and","is","therefor","stateful",".","For","this","reason","it","can","not","be","distributed",".","A","user","can","however","call","the","multiobjective_function","remotely",",","and","aggregate","locally",".","This","is","what","happens","in","the","``","minimize","''","method","of","optimizers",".","when","no_hypervolume","is","true",":","-","Hypervolume","is","n't","used","at","all","!","-","We","simply","add","every","point","to","the","pareto","front","and","state","that","the","pareto","front","needs","to","be","filtered",".","-","The","Pareto","front","is","lazily","kept","up","to","date","because","every","time","you","call","pareto_front","(",")","an","algorithm","is","performed","that","filters","the","pareto","front","into","what","it","should","be","."]
code: def __init__(
      self,
      *,
      upper_bounds: tp.Optional[tp.ArrayLike] = None,
      auto_bound: int = AUTO_BOUND,
      seed: tp.Optional[tp.Union[int, np.random.RandomState]] = None,
      no_hypervolume: bool = False,
  ) -> None:
      self._auto_bound = 0
      self._upper_bounds = (
          np.array([-float("inf")])
          if upper_bounds is None
          else np.array(upper_bounds, copy=False)
      )
      if upper_bounds is None:
          self._auto_bound = auto_bound
      # If we are yet to set the upper bounds, or yet to have an add since doing so, _best_volume is -inf.
      # If we have set the upper bounds and all tells have been worse than them, then _best_volume is a
      # negative number indicating the least amount we have ever been worse.
      # If we have ever beaten the upper bounds, the _best_volume is nonnegative. In particular, it is
      # the hypervolume of the current PF if we are using hypervolume, otherwise 0.
      self._best_volume = -float("Inf")
      self._hypervolume: tp.Optional[HypervolumeIndicator] = None
      self._pareto_needs_filtering = False
      self._no_hypervolume = no_hypervolume
      self._pf = ParetoFront(seed=seed, no_hypervolume=no_hypervolume)
  
file_path: nevergrad/nevergrad/optimization/multiobjective/core.py
imports: import numpy
  import nevergrad.common.typing
  from nevergrad.parametrization import parameter
  from .hypervolume import HypervolumeIndicator
label_desc: Use image node_id 1 to create a new HypervolumePareto object  with example: obj = HypervolumePareto()