class_docstr: Recommender that selects a set of configurations differently in the one-
  dimensional and two- dimensional setting.
  
  In the one-dimensional setting, it greedily picks the configurations which
  provide the lowest joint error. In the multi-dimensional setting, it
  greedily picks the configurations which provide the lowest joint
  hypervolume error.
docstr: Args:
      objectives: The list of performance metrics to minimize.
      focus: The metric to prefer. Must be either in the list of objectives. If not
          provided, the first metric to optimize is chosen.
      generator: The generator that generates configurations for recommendations. By default,
          this is the replay candidate generator.
      enforce_single_objective: Whether the greedy recommender should pick models greedily
          even in the multi-objective case and pick models alternately.
docstr_tok: ["Args",":","objectives",":","The","list","of","performance","metrics","to","minimize",".","focus",":","The","metric","to","prefer",".","Must","be","either","in","the","list","of","objectives",".","If","not","provided",",","the","first","metric","to","optimize","is","chosen",".","generator",":","The","generator","that","generates","configurations","for","recommendations",".","By","default",",","this","is","the","replay","candidate","generator",".","enforce_single_objective",":","Whether","the","greedy","recommender","should","pick","models","greedily","even","in","the","multi-objective","case","and","pick","models","alternately","."]
code: def __init__(
      self,
      objectives: List[str],
      focus: Optional[str] = None,
      generator: Optional[CandidateGenerator[ModelConfig]] = None,
      enforce_single_objective: bool = False,
  ):
      """
      Args:
          objectives: The list of performance metrics to minimize.
          focus: The metric to prefer. Must be either in the list of objectives. If not
              provided, the first metric to optimize is chosen.
          generator: The generator that generates configurations for recommendations. By default,
              this is the replay candidate generator.
          enforce_single_objective: Whether the greedy recommender should pick models greedily
              even in the multi-objective case and pick models alternately.
      """
      super().__init__(objectives, focus, generator)
      self.enforce_single_objective = enforce_single_objective
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/recommender/greedy.py
imports: from collections import defaultdict
  from typing import Dict, List, Optional
  import numpy
  import pygmo
  from sklearn.preprocessing import QuantileTransformer, StandardScaler
  from tsbench.config import Config, DatasetConfig, ModelConfig
  from tsbench.evaluations.metrics import Performance
  from ._base import Recommendation, Recommender
  from ._factory import register_recommender
  from .generator import CandidateGenerator
label_desc: Use image node_id 1 to create a new GreedyRecommender object from inherited base classes: Recommender with example: obj = GreedyRecommender(objectives, focus, generator, enforce_single_objective)