class_docstr: Encodes categorical features.
  
  Several strategies are possible (supervised or not). Works for both
  classification and regression tasks.
  
  Parameters
  ----------
  strategy : str, default = "label_encoding"
      The strategy to encode categorical features.
      Available strategies = {"label_encoding", "dummification",
      "random_projection", entity_embedding"}
  verbose : bool, default = False
      Verbose mode. Useful for entity embedding strategy.
class_docstr_tok: ["Encodes","categorical","features",".","Several","strategies","are","possible","(","supervised","or","not",")",".","Works","for","both","classification","and","regression","tasks",".","Parameters","--","--","--","--","--","strategy",":","str",",","default","=","``","label_encoding","''","The","strategy","to","encode","categorical","features",".","Available","strategies","=","{","``","label_encoding","''",",","``","dummification","''",",","``","random_projection","''",",","entity_embedding","''","}","verbose",":","bool",",","default","=","False","Verbose","mode",".","Useful","for","entity","embedding","strategy","."]
docstr: Fits Categorical Encoder and transforms the dataset.
  
  Fit categorical encoder following strategy parameter and transform the
  dataset df_train.
  
  Parameters
  ----------
  df_train : pandas.Dataframe of shape = (n_train, n_features)
      The training dataset with numerical and categorical features.
      NA values are allowed.
  y_train : pandas.Series of shape = (n_train, ).
      The target for classification or regression tasks.
  
  Returns
  -------
  pandas.Dataframe of shape = (n_train, n_features)
      Training dataset with numerical and encoded categorical features.
docstr_tok: ["Fits","Categorical","Encoder","and","transforms","the","dataset",".","Fit","categorical","encoder","following","strategy","parameter","and","transform","the","dataset","df_train",".","Parameters","--","--","--","--","--","df_train",":","pandas.Dataframe","of","shape","=","(","n_train",",","n_features",")","The","training","dataset","with","numerical","and","categorical","features",".","NA","values","are","allowed",".","y_train",":","pandas.Series","of","shape","=","(","n_train",",",")",".","The","target","for","classification","or","regression","tasks",".","Returns","--","--","--","-","pandas.Dataframe","of","shape","=","(","n_train",",","n_features",")","Training","dataset","with","numerical","and","encoded","categorical","features","."]
code: def fit_transform(self, df_train, y_train):
      """Fits Categorical Encoder and transforms the dataset.
  
      Fit categorical encoder following strategy parameter and transform the
      dataset df_train.
  
      Parameters
      ----------
      df_train : pandas.Dataframe of shape = (n_train, n_features)
          The training dataset with numerical and categorical features.
          NA values are allowed.
      y_train : pandas.Series of shape = (n_train, ).
          The target for classification or regression tasks.
  
      Returns
      -------
      pandas.Dataframe of shape = (n_train, n_features)
          Training dataset with numerical and encoded categorical features.
  
      """
      self.fit(df_train, y_train)
  
      return self.transform(df_train)
  
file_path: MLBox/mlbox/encoding/categorical_encoder.py
imports: import numpy
  import pandas
  import warnings
  import os
  from tensorflow.keras.layers import Dense, Reshape, Dropout, Embedding, concatenate, Input
  from tensorflow.keras.models import Model
label_desc: Use image node_id 5 for calling the Categorical_encoder obj's underlying member method code with example usage: obj.fit_transform(df_train, y_train) and returns: self