class_docstr: The surrogate analyzer evaluates the performance of a surrogate model with
  respect to ranking and regression metrics.
  
  The analysis is run in parallel and should, thus, not be used in a Jupyter
  notebook. Instead, consider using the `tsbench` CLI.
docstr: Args:
      surrogate: The surrogate model to evaluate.
      tracker: The collector from which to obtain the data for evaluation.
      metrics: The metrics to evaluate. If not provided, evaluates all metrics.
docstr_tok: ["Args",":","surrogate",":","The","surrogate","model","to","evaluate",".","tracker",":","The","collector","from","which","to","obtain","the","data","for","evaluation",".","metrics",":","The","metrics","to","evaluate",".","If","not","provided",",","evaluates","all","metrics","."]
code: def __init__(
      self,
      surrogate: Surrogate[ModelConfig],
      tracker: ModelTracker,
      metrics: Optional[List[str]] = None,
  ):
      """
      Args:
          surrogate: The surrogate model to evaluate.
          tracker: The collector from which to obtain the data for evaluation.
          metrics: The metrics to evaluate. If not provided, evaluates all metrics.
      """
      self.surrogate = surrogate
      self.tracker = tracker
      self.metrics = metrics
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/analysis/surrogate/analyzer.py
imports: from typing import List, Optional, Tuple
  import numpy
  import pandas
  from tqdm.auto import tqdm
  from tsbench.analysis.utils import loocv_split, num_fitting_processes, run_parallel
  from tsbench.config import Config, ModelConfig
  from tsbench.evaluations.metrics import Performance
  from tsbench.evaluations.tracking import ModelTracker
  from tsbench.surrogate import AutoGluonSurrogate, Surrogate
  from .metrics import mrr, ndcg, nrmse, precision_k, smape
label_desc: Use image node_id 1 to create a new SurrogateAnalyzer object  with example: obj = SurrogateAnalyzer(surrogate, tracker, metrics)