class_docstr: Converts category features to one-hot boolean features by mapping to the category codes.
  
  Parameters
  ----------
  max_levels : int
      The maximum number of categories to use for OHE per feature. Selected categories are based on frequency.
  dtype : number type, default = np.uint8
      Desired dtype of output.
  sparse : bool, default = True
      Will return sparse matrix if set True else will return an array.
  drop : str, default = None
      Refer to OneHotEncoder documentation for details.
class_docstr_tok: ["Converts","category","features","to","one-hot","boolean","features","by","mapping","to","the","category","codes",".","Parameters","--","--","--","--","--","max_levels",":","int","The","maximum","number","of","categories","to","use","for","OHE","per","feature",".","Selected","categories","are","based","on","frequency",".","dtype",":","number","type",",","default","=","np.uint8","Desired","dtype","of","output",".","sparse",":","bool",",","default","=","True","Will","return","sparse","matrix","if","set","True","else","will","return","an","array",".","drop",":","str",",","default","=","None","Refer","to","OneHotEncoder","documentation","for","details","."]
docstr: Call this method directly to get numpy output.
  Skips pandas conversion (much faster if only the numpy output is required).
docstr_tok: ["Call","this","method","directly","to","get","numpy","output",".","Skips","pandas","conversion","(","much","faster","if","only","the","numpy","output","is","required",")","."]
code: def transform_ohe(self, X: DataFrame):
      """
      Call this method directly to get numpy output.
      Skips pandas conversion (much faster if only the numpy output is required).
      """
      if self._cat_feat_gen is not None:
          X = self._cat_feat_gen.transform(X)
      X = self._ohe.transform(X)
      return X
  
imports: import logging
  import warnings
  import numpy
  import pandas
  from pandas import DataFrame
  from sklearn.preprocessing import OneHotEncoder
  from autogluon.common.features.types import R_CATEGORY, R_INT, S_BOOL, S_SPARSE
  from .abstract import AbstractFeatureGenerator
label_desc: Use image node_id 5 for calling the OneHotEncoderFeatureGenerator obj's underlying member method code with example usage: obj.transform_ohe(X) and returns: X