class_docstr: Encode categorical features as a one-hot numeric array.
  The input to this transformer should be a dask_cuDF.DataFrame or cupy
  dask.Array, denoting the values taken on by categorical features.
  The features are encoded using a one-hot (aka 'one-of-K' or 'dummy')
  encoding scheme. This creates a binary column for each category and
  returns a sparse matrix or dense array (depending on the ``sparse``
  parameter).
  By default, the encoder derives the categories based on the unique values
  in each feature. Alternatively, you can also specify the `categories`
  manually.
  
  Parameters
  ----------
  categories : 'auto', cupy.ndarray or cudf.DataFrame, default='auto'
      Categories (unique values) per feature. All categories are expected to
      fit on one GPU.
  
      - 'auto' : Determine categories automatically from the training data.
  
      - DataFrame/ndarray : ``categories[col]`` holds the categories expected
        in the feature col.
  
  drop : 'first', None or a dict, default=None
      Specifies a methodology to use to drop one of the categories per
      feature. This is useful in situations where perfectly collinear
      features cause problems, such as when feeding the resulting data
      into a neural network or an unregularized regression.
  
      - None : retain all features (the default).
  
      - 'first' : drop the first category in each feature. If only one
        category is present, the feature will be dropped entirely.
  
      - Dict : ``drop[col]`` is the category in feature col that
        should be dropped.
  
  sparse : bool, default=False
      This feature was deactivated and will give an exception when True.
      The reason is because sparse matrix are not fully supported by cupy
      yet, causing incorrect values when computing one hot encodings.
      See https://github.com/cupy/cupy/issues/3223
  dtype : number type, default=np.float
      Desired datatype of transform's output.
  handle_unknown : {'error', 'ignore'}, default='error'
      Whether to raise an error or ignore if an unknown categorical feature
      is present during transform (default is to raise). When this parameter
      is set to 'ignore' and an unknown category is encountered during
      transform, the resulting one-hot encoded columns for this feature
      will be all zeros. In the inverse transform, an unknown category
      will be denoted as None.
class_docstr_tok: ["Encode","categorical","features","as","a","one-hot","numeric","array",".","The","input","to","this","transformer","should","be","a","dask_cuDF.DataFrame","or","cupy","dask.Array",",","denoting","the","values","taken","on","by","categorical","features",".","The","features","are","encoded","using","a","one-hot","(","aka","'one-of-K","'","or","'dummy","'",")","encoding","scheme",".","This","creates","a","binary","column","for","each","category","and","returns","a","sparse","matrix","or","dense","array","(","depending","on","the","``","sparse","``","parameter",")",".","By","default",",","the","encoder","derives","the","categories","based","on","the","unique","values","in","each","feature",".","Alternatively",",","you","can","also","specify","the","`","categories","`","manually",".","Parameters","--","--","--","--","--","categories",":","'auto","'",",","cupy.ndarray","or","cudf.DataFrame",",","default='auto'","Categories","(","unique","values",")","per","feature",".","All","categories","are","expected","to","fit","on","one","GPU",".","-","'auto","'",":","Determine","categories","automatically","from","the","training","data",".","-","DataFrame\/ndarray",":","``","categories","[","col","]","``","holds","the","categories","expected","in","the","feature","col.","drop",":","'first","'",",","None","or","a","dict",",","default=None","Specifies","a","methodology","to","use","to","drop","one","of","the","categories","per","feature",".","This","is","useful","in","situations","where","perfectly","collinear","features","cause","problems",",","such","as","when","feeding","the","resulting","data","into","a","neural","network","or","an","unregularized","regression",".","-","None",":","retain","all","features","(","the","default",")",".","-","'first","'",":","drop","the","first","category","in","each","feature",".","If","only","one","category","is","present",",","the","feature","will","be","dropped","entirely",".","-","Dict",":","``","drop","[","col","]","``","is","the","category","in","feature","col","that","should","be","dropped",".","sparse",":","bool",",","default=False","This","feature","was","deactivated","and","will","give","an","exception","when","True",".","The","reason","is","because","sparse","matrix","are","not","fully","supported","by","cupy","yet",",","causing","incorrect","values","when","computing","one","hot","encodings",".","See","https",":","\/\/github.com\/cupy\/cupy\/issues\/3223","dtype",":","number","type",",","default=np.float","Desired","datatype","of","transform","'s","output",".","handle_unknown",":","{","'error","'",",","'ignore","'","}",",","default='error'","Whether","to","raise","an","error","or","ignore","if","an","unknown","categorical","feature","is","present","during","transform","(","default","is","to","raise",")",".","When","this","parameter","is","set","to","'ignore","'","and","an","unknown","category","is","encountered","during","transform",",","the","resulting","one-hot","encoded","columns","for","this","feature","will","be","all","zeros",".","In","the","inverse","transform",",","an","unknown","category","will","be","denoted","as","None","."]
docstr: Fit a multi-node multi-gpu OneHotEncoder to X.
  
  Parameters
  ----------
  X : Dask cuDF DataFrame or CuPy backed Dask Array
      The data to determine the categories of each feature.
  
  Returns
  -------
  self
docstr_tok: ["Fit","a","multi-node","multi-gpu","OneHotEncoder","to","X.","Parameters","--","--","--","--","--","X",":","Dask","cuDF","DataFrame","or","CuPy","backed","Dask","Array","The","data","to","determine","the","categories","of","each","feature",".","Returns","--","--","--","-","self"]
code: def fit(self, X):
      """Fit a multi-node multi-gpu OneHotEncoder to X.
  
      Parameters
      ----------
      X : Dask cuDF DataFrame or CuPy backed Dask Array
          The data to determine the categories of each feature.
  
      Returns
      -------
      self
      """
      from cuml.preprocessing.onehotencoder_mg import OneHotEncoderMG
  
      el = first(X) if isinstance(X, Sequence) else X
      self.datatype = (
          "cudf"
          if isinstance(el, (dcDataFrame, daskSeries))
          else "cupy"
      )
  
      self._set_internal_model(OneHotEncoderMG(**self.kwargs).fit(X))
  
      return self
  
imports: from collections.abc import Sequence
  from cuml.common import with_cupy_rmm
  from cuml.dask.common.base import BaseEstimator, DelayedInverseTransformMixin, DelayedTransformMixin
  from cuml.internals.safe_imports import gpu_only_import_from, gpu_only_import
  from dask_cudf.core import Series
  from toolz import first
label_desc: Use image node_id 1 for calling the OneHotEncoder obj's underlying member method code with example usage: obj.fit(X) and returns: self