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: Collapses the levels of an orthogonal Latin hypercube parameter table
  
  Parameters
  ----------
  olh_perf_table: `pandas.DataFrame`
      array of normalized trial parameters as floats in range [0., 1.]
  
  n_levels: int
      number of levels in the OLH table
  
  Returns
  -------
  A ``pandas.DataFrame`` of the orthogonal array table
docstr_tok: ["Collapses","the","levels","of","an","orthogonal","Latin","hypercube","parameter","table","Parameters","--","--","--","--","--","olh_perf_table",":","`","pandas.DataFrame","`","array","of","normalized","trial","parameters","as","floats","in","range","[","0.",",","1",".","]","n_levels",":","int","number","of","levels","in","the","OLH","table","Returns","--","--","--","-","A","``","pandas.DataFrame","``","of","the","orthogonal","array","table"]
code: def _collapse_levels(
      olh_perf_table: pd.DataFrame, n_levels: int
  ) -> pd.DataFrame:
      """
      Collapses the levels of an orthogonal Latin hypercube parameter table
  
      Parameters
      ----------
      olh_perf_table: `pandas.DataFrame`
          array of normalized trial parameters as floats in range [0., 1.]
  
      n_levels: int
          number of levels in the OLH table
  
      Returns
      -------
      A ``pandas.DataFrame`` of the orthogonal array table
  
      """
      oa_table = np.ceil(
          olh_perf_table.iloc[:, :-1] * (n_levels)
      ).astype(int)
      oa_table[oa_table.iloc[:, :] == 0] = 1
      oa_table["objective"] = olh_perf_table["objective"]
      return oa_table
  
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 3 for calling the Transformer obj's underlying member method code with example usage: obj._collapse_levels(olh_perf_table, n_levels) and returns: oa_table