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: Normalize the Y array and return its mean and standard deviations.
  
  Parameters
  ----------
  Y : np.ndarray
      Labels from the datasets.
  indexD : np.ndarray
      Task indices of corresponding labels Y.
  
  Returns
  -------
  Tuple[np.ndarray, np.ndarray, np.ndarray]
      Tuple containing the Y array, the mean array, and the std array.
docstr_tok: ["Normalize","the","Y","array","and","return","its","mean","and","standard","deviations",".","Parameters","--","--","--","--","--","Y",":","np.ndarray","Labels","from","the","datasets",".","indexD",":","np.ndarray","Task","indices","of","corresponding","labels","Y",".","Returns","--","--","--","-","Tuple","[","np.ndarray",",","np.ndarray",",","np.ndarray","]","Tuple","containing","the","Y","array",",","the","mean","array",",","and","the","std","array","."]
code: def normalize_Y(
      self, Y: np.ndarray, indexD: np.ndarray
  ) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
      """Normalize the Y array and return its mean and standard deviations.
  
      Parameters
      ----------
      Y : np.ndarray
          Labels from the datasets.
      indexD : np.ndarray
          Task indices of corresponding labels Y.
  
      Returns
      -------
      Tuple[np.ndarray, np.ndarray, np.ndarray]
          Tuple containing the Y array, the mean array, and the std array.
      """
      max_idx = np.max(indexD)
      Y_mean = np.zeros(max_idx + 1)
      Y_std = np.zeros(max_idx + 1)
      for i in range(max_idx + 1):
          Y_mean[i] = Y[indexD == i].mean()
          Y_std[i] = Y[indexD == i].std() + 1e-8
          Y[indexD == i] = (Y[indexD == i] - Y_mean[i]) / Y_std[i]
      return Y, Y_mean[:, None], Y_std[:, None]
  
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 3 for calling the MetaModelConfig obj's underlying member method code with example usage: obj.normalize_Y(Y, indexD) and returns: Y,  Y_mean,  Y_std