class_docstr: The performance transformer transforms performances into model outputs for
  supervised learning as well as model outputs to performance objects.
class_docstr_tok: ["The","performance","transformer","transforms","performances","into","model","outputs","for","supervised","learning","as","well","as","model","outputs","to","performance","objects","."]
docstr: Uses the provided performances to fit the performance transformer.
  
  Args:
      y: The performance objects.
docstr_tok: ["Uses","the","provided","performances","to","fit","the","performance","transformer",".","Args",":","y",":","The","performance","objects","."]
code: def fit(self, y: list[Performance]) -> PerformanceTransformer:
      """
      Uses the provided performances to fit the performance transformer.
  
      Args:
          y: The performance objects.
      """
      self.encoder.fit(y)
      return self
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/surrogate/transformers/performance.py
imports: from __future__ import annotations
  from typing import Any, List, Optional
  import numpy
  import numpy.typing
  import pandas
  from sklearn.base import TransformerMixin
  from tsbench.evaluations.metrics import Performance
label_desc: Use image node_id 3 for calling the PerformanceTransformer obj's underlying member method code with example usage: obj.fit(y) and returns: self