class_docstr: Transformer stage of MOFA
  
  Parameters
  ----------
  roi_space: `orion.algo.space.Space`
      Parameter region-of-interest as orion.algo.space.Space instance
  n_levels: int
      Number of levels
class_docstr_tok: ["Transformer","stage","of","MOFA","Parameters","--","--","--","--","--","roi_space",":","`","orion.algo.space.Space","`","Parameter","region-of-interest","as","orion.algo.space.Space","instance","n_levels",":","int","Number","of","levels"]
docstr: Build an orthogonal Latin hypercube (OLH) performance table from trial parameters
  
  Parameters
  ----------
  trials: list of orion.core.worker.trial.Trial objects
      Completed trials
docstr_tok: ["Build","an","orthogonal","Latin","hypercube","(","OLH",")","performance","table","from","trial","parameters","Parameters","--","--","--","--","--","trials",":","list","of","orion.core.worker.trial.Trial","objects","Completed","trials"]
code: def generate_olh_perf_table(
      self, trials: list[Trial]
  ) -> pd.DataFrame:
      """
      Build an orthogonal Latin hypercube (OLH) performance table from trial parameters
  
      Parameters
      ----------
      trials: list of orion.core.worker.trial.Trial objects
          Completed trials
      """
      # TODO: deal with categoricals
  
      # Put trial params into list
      olh_param_table = []
      olh_objective_table = []
      for trial in trials:
          if trial.status != "completed":
              continue
          # Take subset in self.space only
          trial_params = flatten(trial.params)
          param_vals = [trial_params[key] for key in self.space]
          olh_param_table.append(param_vals)
          olh_objective_table.append(trial.objective.value)
  
      # Normalize
      olh_param_table = np.clip(
          np.array(olh_param_table),
          a_min=[bound[0] for bound in self.sk_space.bounds],
          a_max=[bound[1] for bound in self.sk_space.bounds],
      )
      olh_param_table = self.sk_space.transform(olh_param_table)
      table = np.hstack(
          [olh_param_table, np.array(olh_objective_table)[:, None]]
      )
  
      return pd.DataFrame(
          table, columns=list(self.space.keys()) + ["objective"]
      )
  
file_path: orion/src/orion/algo/mofa/transformer.py
imports: from __future__ import annotations
  import numpy
  import pandas
  from skopt.space import Space
  from orion.algo.space import Space
  from orion.core.utils.flatten import flatten
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 2 for calling the Transformer obj's underlying member method code with example usage: obj.generate_olh_perf_table(trials) and returns: pd