class_docstr: Class for automatic categorical data detection and one hot encoding 
class_docstr_tok: ["Class","for","automatic","categorical","data","detection","and","one","hot","encoding"]
docstr: Method for fit encoder with automatic determination of categorical features
  
  :param input_data: data with features, target and ids for encoder training
  :return encoder: trained encoder (optional output)
docstr_tok: ["Method","for","fit","encoder","with","automatic","determination","of","categorical","features",":","param","input_data",":","data","with","features",",","target","and","ids","for","encoder","training",":","return","encoder",":","trained","encoder","(","optional","output",")"]
code: def fit(self, input_data: InputData):
      """Method for fit encoder with automatic determination of categorical features
  
      :param input_data: data with features, target and ids for encoder training
      :return encoder: trained encoder (optional output)
      """
      features = input_data.features
      feature_type_ids = input_data.supplementary_data.col_type_ids[
          "features"
      ]
      (
          self.categorical_ids,
          self.non_categorical_ids,
      ) = find_categorical_columns(features, feature_type_ids)
  
      # If there are categorical features - process it
      if self.categorical_ids:
          updated_cat_features = features[
              :, self.categorical_ids
          ].astype(str)
          self.encoder.fit(updated_cat_features)
  
      return self.encoder
  
imports: from copy import deepcopy
  from typing import List, Optional
  import numpy
  from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.data.data_preprocessing import find_categorical_columns
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import DataOperationImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.preprocessing.data_types import TYPE_TO_ID
label_desc: Use image node_id 2 for calling the OneHotEncodingImplementation obj's underlying member method code with example usage: obj.fit(input_data) and returns: self