docstr: Pareto front, as a list of Parameter. The losses can be accessed through
  parameter.losses
  
  Parameters
  ------------
  size:  int (optional)
      if provided, selects a subset of the full pareto front with the given maximum size
  subset: str
      method for selecting the subset ("random, "loss-covering", "EPS", "domain-covering", "hypervolume")
      EPS is the epsilon indicator described e.g.
          here: https://hal.archives-ouvertes.fr/hal-01159961v2/document
  subset_tentatives: int
      number of random tentatives for finding a better subset
  
  Returns
  --------
  list
      the list of Parameter of the pareto front
docstr_tok: ["Pareto","front",",","as","a","list","of","Parameter",".","The","losses","can","be","accessed","through","parameter.losses","Parameters","--","--","--","--","--","--","size",":","int","(","optional",")","if","provided",",","selects","a","subset","of","the","full","pareto","front","with","the","given","maximum","size","subset",":","str","method","for","selecting","the","subset","(","``","random",",","``","loss-covering","''",",","``","EPS","''",",","``","domain-covering","''",",","``","hypervolume","''",")","EPS","is","the","epsilon","indicator","described","e.g",".","here",":","https",":","\/\/hal.archives-ouvertes.fr\/hal-01159961v2\/document","subset_tentatives",":","int","number","of","random","tentatives","for","finding","a","better","subset","Returns","--","--","--","--","list","the","list","of","Parameter","of","the","pareto","front"]
code: def get_front(
      self,
      size: tp.Optional[int] = None,
      subset: str = "random",
      subset_tentatives: int = 12,
  ) -> tp.List[p.Parameter]:
      """Pareto front, as a list of Parameter. The losses can be accessed through
      parameter.losses
  
      Parameters
      ------------
      size:  int (optional)
          if provided, selects a subset of the full pareto front with the given maximum size
      subset: str
          method for selecting the subset ("random, "loss-covering", "EPS", "domain-covering", "hypervolume")
          EPS is the epsilon indicator described e.g.
              here: https://hal.archives-ouvertes.fr/hal-01159961v2/document
      subset_tentatives: int
          number of random tentatives for finding a better subset
  
      Returns
      --------
      list
          the list of Parameter of the pareto front
      """
      if self._pareto_needs_filtering:
          self._filter_pareto_front()
      if size is None or size >= len(
          self._pareto
      ):  # No limit: we return the full set.
          return self._pareto
      if subset == "random":
          return self._rng.choice(self._pareto, size).tolist()  # type: ignore
      tentatives = [self._rng.choice(self._pareto, size).tolist() for _ in range(subset_tentatives)]  # type: ignore
      if self._hypervolume is None and subset == "hypervolume":
          raise RuntimeError(
              "Hypervolume subsetting not supported as hypervolume not in use"
          )
      hypervolume = self._hypervolume
      scores: tp.List[float] = []
      for tentative in tentatives:
          if subset == "hypervolume":
              scores += [-hypervolume.compute([pa.losses for pa in tentative])]  # type: ignore
          else:
              score: float = 0.0
              for v in self._pareto:
                  best_score = float("inf") if subset != "EPS" else 0.0
                  for pa in tentative:
                      if (
                          subset == "loss-covering"
                      ):  # Equivalent to IGD.
                          best_score = min(best_score, np.linalg.norm(pa.losses - v.losses))  # type: ignore
                      elif subset == "EPS":  # Cone Epsilon-Dominance.
                          best_score = min(
                              best_score, max(pa.losses - v.losses)
                          )
                      elif subset == "domain-covering":
                          best_score = min(  # type: ignore
                              best_score,
                              np.linalg.norm(
                                  pa.get_standardized_data(reference=v)
                              ),
                          )  # TODO verify
                      else:
                          raise ValueError(
                              f'Unknown subset for Pareto-Set subsampling: "{subset}"'
                          )
                  score += (
                      best_score**2
                      if subset != "EPS"
                      else max(score, best_score)
                  )
              scores += [score]
      return tentatives[scores.index(min(scores))]
  
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 5 for calling the ParetoFront obj's underlying member method code with example usage: obj.get_front(size, subset, subset_tentatives) and returns: tentatives, self, self