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.
code: def _run_on_dataset(
      self,
      data: Tuple[
          Tuple[List[Config[ModelConfig]], List[Performance]],
          Tuple[List[Config[ModelConfig]], List[Performance]],
      ],
  ) -> pd.DataFrame:
      (X_train, y_train), (X_test, y_test) = data
  
      # Fit model and predict
      self.surrogate.fit(X_train, y_train)
      y_pred = self.surrogate.predict(X_test)
  
      # Compute metrics
      scores = self._score(y_pred, y_test)
      return scores.assign(test_dataset=X_test[0].dataset.name())
  
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 3 for calling the SurrogateAnalyzer obj's underlying member method code with example usage: obj._run_on_dataset(data) and returns: scores