class_docstr: Preprocess one multimodal pd.DataFrame including image paths, image bytearrays, texts, numerical features,
  and categorical features. Each modality may have multiple columns.
  The preprocessor is designed to output model-agnostic features.
class_docstr_tok: ["Preprocess","one","multimodal","pd.DataFrame","including","image","paths",",","image","bytearrays",",","texts",",","numerical","features",",","and","categorical","features",".","Each","modality","may","have","multiple","columns",".","The","preprocessor","is","designed","to","output","model-agnostic","features","."]
docstr: Transform model's output logits/probability into class labels for classification
  or raw numerical values for regression.
  
  Parameters
  ----------
  y_pred
      The model's output logits/probability.
  inverse_categorical
      Whether to transform categorical value back to the original space, e.g., string values.
  return_proba
      Whether return the probability or not.
  
  Returns
  -------
  Predicted labels ready to compute metric scores.
code: def transform_prediction(
      self,
      y_pred: Union[np.ndarray, dict],
      inverse_categorical: bool = True,
      return_proba: bool = False,
  ) -> NDArray:
      """
      Transform model's output logits/probability into class labels for classification
      or raw numerical values for regression.
  
      Parameters
      ----------
      y_pred
          The model's output logits/probability.
      inverse_categorical
          Whether to transform categorical value back to the original space, e.g., string values.
      return_proba
          Whether return the probability or not.
  
      Returns
      -------
      Predicted labels ready to compute metric scores.
      """
      assert (
          self._fit_called or self._fit_y_called
      ), "You will need to first call preprocessor.fit_y() before calling preprocessor.transform_prediction."
  
      if self.label_type == CATEGORICAL:
          assert y_pred.shape[1] >= 2
          y_pred = y_pred.argmax(axis=1)
          # Transform the predicted label back to the original space (e.g., string values)
          if inverse_categorical:
              y_pred = self._label_generator.inverse_transform(y_pred)
      elif self.label_type == NUMERICAL:
          y_pred = self._label_scaler.inverse_transform(y_pred)
          y_pred = np.squeeze(y_pred)
          # Convert nan to 0
          y_pred = np.nan_to_num(y_pred)
      elif self.label_type == NER_ANNOTATION:
          y_pred = self._label_generator.inverse_transform(y_pred)
  
          if return_proba:
              y_pred = y_pred[-1]
          else:
              if inverse_categorical:
                  # Return annotations and offsets
                  y_pred = y_pred[1]
              else:
                  y_pred = y_pred[0]
      else:
          raise NotImplementedError
  
      return y_pred
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from nptyping import NDArray
  from omegaconf import DictConfig, OmegaConf
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler, StandardScaler
  from autogluon.features import CategoryFeatureGenerator
  from ..constants import AUTOMM, CATEGORICAL, DOCUMENT, DOCUMENT_IMAGE, IDENTIFIER, IMAGE, IMAGE_BYTEARRAY, IMAGE_PATH, LABEL, NER, NER_ANNOTATION, NULL, NUMERICAL, OVD, ROIS, SEMANTIC_SEGMENTATION, SEMANTIC_SEGMENTATION_GT, SEMANTIC_SEGMENTATION_IMG, TEXT, TEXT_NER
  from .label_encoder import CustomLabelEncoder
label_desc: Use image node_id 39 for calling the MultiModalFeaturePreprocessor obj's underlying member method code with example usage: obj.transform_prediction(y_pred, inverse_categorical, return_proba) and returns: y_pred