class_docstr: The ensemble analyzer allows for evaluating the performance of ensembles
  across datasets.
  
  The analysis is run in parallel and should, thus, not be used in a Jupyter
  notebook. Instead, consider using the `tsbench` CLI.
docstr: Args:
      tracker: The tracker from which to obtain pretrained models and forecasts.
      ensemble_size: The number of models to use when building an ensemble. If not provided,
          uses as many models as possible.
      ensemble_weighting: The type of ensemble weighting to use for averaging forecasts.
      config_class: The class of models to ensemble. If this is provided, fewer models than
          the given ensemble size might be selected.
docstr_tok: ["Args",":","tracker",":","The","tracker","from","which","to","obtain","pretrained","models","and","forecasts",".","ensemble_size",":","The","number","of","models","to","use","when","building","an","ensemble",".","If","not","provided",",","uses","as","many","models","as","possible",".","ensemble_weighting",":","The","type","of","ensemble","weighting","to","use","for","averaging","forecasts",".","config_class",":","The","class","of","models","to","ensemble",".","If","this","is","provided",",","fewer","models","than","the","given","ensemble","size","might","be","selected","."]
code: def __init__(
      self,
      tracker: ModelTracker,
      ensemble_size: Optional[int] = 10,
      ensemble_weighting: EnsembleWeighting = "uniform",
      config_class: Optional[Type[ModelConfig]] = None,
  ):
      """
      Args:
          tracker: The tracker from which to obtain pretrained models and forecasts.
          ensemble_size: The number of models to use when building an ensemble. If not provided,
              uses as many models as possible.
          ensemble_weighting: The type of ensemble weighting to use for averaging forecasts.
          config_class: The class of models to ensemble. If this is provided, fewer models than
              the given ensemble size might be selected.
      """
      self.tracker = tracker
      self.ensemble_size = ensemble_size
      self.ensemble_weighting: EnsembleWeighting = ensemble_weighting
      self.config_class = config_class
  
imports: import itertools
  import math
  import random
  from pathlib import Path
  from typing import Callable, Dict, List, Optional, Tuple, Type
  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, DATASET_REGISTRY, DatasetConfig, ModelConfig, TrainConfig
  from tsbench.config.model.models import SeasonalNaiveModelConfig
  from tsbench.constants import DEFAULT_DATA_PATH
  from tsbench.evaluations.metrics.performance import Metric, Performance
  from tsbench.evaluations.tracking import ModelTracker
  from tsbench.forecasts import ensemble_forecasts, EnsembleWeighting, evaluate_forecasts, Evaluation
label_desc: Use image node_id 1 to create a new EnsembleAnalyzer object  with example: obj = EnsembleAnalyzer(tracker, ensemble_size, ensemble_weighting, config_class)