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: Transforms the provided performance object into NumPy arrays according
  to the fitted transformer.
  
  Args:
      y: The performance objects.
  
  Returns:
      An array of shape [N, K] of transformed performance objects (N: the number of
          performance objects, K: number of performance metrics).
docstr_tok: ["Transforms","the","provided","performance","object","into","NumPy","arrays","according","to","the","fitted","transformer",".","Args",":","y",":","The","performance","objects",".","Returns",":","An","array","of","shape","[","N",",","K","]","of","transformed","performance","objects","(","N",":","the","number","of","performance","objects",",","K",":","number","of","performance","metrics",")","."]
code: def transform(self, y: list[Performance]) -> npt.NDArray[np.float32]:
      """
      Transforms the provided performance object into NumPy arrays according
      to the fitted transformer.
  
      Args:
          y: The performance objects.
  
      Returns:
          An array of shape [N, K] of transformed performance objects (N: the number of
              performance objects, K: number of performance metrics).
      """
      return self.encoder.transform(y)
  
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 4 for calling the PerformanceTransformer obj's underlying member method code with example usage: obj.transform(y) and returns: self