class_docstr: Configuration options for the training of the Profet meta-model.
class_docstr_tok: ["Configuration","options","for","the","training","of","the","Profet","meta-model","."]
docstr: Generate features for the given task.
  
  Parameters
  ----------
  X : np.ndarray
      Training examples
  Y : np.ndarray
      Training labels
  C : np.ndarray
      Training costs
  display_messages : bool, optional
      Whether to log messages to the console or not, by default True.
  
  Returns
  -------
  Tuple[np.ndarray, np.ndarray]
      The features mean and std arrays.
docstr_tok: ["Generate","features","for","the","given","task",".","Parameters","--","--","--","--","--","X",":","np.ndarray","Training","examples","Y",":","np.ndarray","Training","labels","C",":","np.ndarray","Training","costs","display_messages",":","bool",",","optional","Whether","to","log","messages","to","the","console","or","not",",","by","default","True",".","Returns","--","--","--","-","Tuple","[","np.ndarray",",","np.ndarray","]","The","features","mean","and","std","arrays","."]
code: def _get_features(
      self,
      X: np.ndarray,
      Y: np.ndarray,
      C: np.ndarray,
      display_messages: bool = True,
  ) -> Tuple[np.ndarray, np.ndarray]:
      """Generate features for the given task.
  
      Parameters
      ----------
      X : np.ndarray
          Training examples
      Y : np.ndarray
          Training labels
      C : np.ndarray
          Training costs
      display_messages : bool, optional
          Whether to log messages to the console or not, by default True.
  
      Returns
      -------
      Tuple[np.ndarray, np.ndarray]
          The features mean and std arrays.
      """
      n_tasks = Y.shape[0]
      n_configs = X.shape[0]
      index_task = np.repeat(np.arange(n_tasks), n_configs)
      Y_norm, _, _ = self.normalize_Y(deepcopy(Y.flatten()), index_task)
  
      # train the probabilistic encoder
      kern = GPy.kern.Matern52(input_dim=self.hidden_space, ARD=True)
  
      m_lvm = BayesianGPLVM(
          Y_norm.reshape(n_tasks, n_configs),
          input_dim=self.hidden_space,
          kernel=kern,
          num_inducing=self.n_inducing_lvm,
      )
      m_lvm.optimize(
          max_iters=self.max_iters, messages=display_messages
      )
  
      ls = np.array(
          [
              m_lvm.kern.lengthscale[i]
              for i in range(m_lvm.kern.lengthscale.shape[0])
          ]
      )
  
      # generate data to train the multi-task model
      task_features_mean = np.array(m_lvm.X.mean / ls)
      task_features_std = np.array(np.sqrt(m_lvm.X.variance) / ls)
  
      return task_features_mean, task_features_std
  
imports: import json
  import pickle
  import warnings
  from abc import ABC
  from copy import deepcopy
  from dataclasses import dataclass
  from logging import getLogger
  from pathlib import Path
  from typing import Any, Callable, ClassVar, Optional, Tuple, Union
  import numpy
label_desc: Use image node_id 4 for calling the MetaModelConfig obj's underlying member method code with example usage: obj._get_features(X, Y, C, display_messages) and returns: task_features_mean,  task_features_std