class_docstr: Tranformer for converting aif360 dataset to LIME dataset and vice versa.
  
  (LIME - Local Interpretable Model-Agnostic Explanations) [2]_
  
  See for details/usage:
  https://github.com/marcotcr/lime
  
  References:
      .. [2] M.T. Ribeiro, S. Singh, and C. Guestrin, '"Why should I trust
         you?" Explaining the predictions of any classifier.'
         https://arxiv.org/pdf/1602.04938v1.pdf
docstr: Take aif360 data array and return data array that is lime encoded
  (numeric array in which categorical features are NOT one-hot-encoded).
  
  Args:
      aif360data (np.ndarray): Dataset features
  
  Returns:
      np.ndarray: LIME dataset features
code: def transform(self, aif360data):
      """Take aif360 data array and return data array that is lime encoded
      (numeric array in which categorical features are NOT one-hot-encoded).
  
      Args:
          aif360data (np.ndarray): Dataset features
  
      Returns:
          np.ndarray: LIME dataset features
      """
      tgtNumRows = aif360data.shape[0]
      tgtNumcolumns = len(self.s_feature_names)
      limedata = np.zeros(shape=(tgtNumRows, tgtNumcolumns))
  
      # non_categorical_features = list(set(self.s_feature_names) & set(self.s_feature_names_with_one_hot_encoding))
      for rw in range(limedata.shape[0]):
          for ind, feature in enumerate(self.s_feature_names):
              if ind in self.s_categorical_features:
                  # tranform the value since categorical feature except if it
                  # is also a protected attribute
                  if feature in self.s_protected_attribute_names:
                      # just copy the value as is
                      limedata[rw, ind] = aif360data[
                          rw,
                          self.s_feature_names_with_one_hot_encoding.index(
                              feature
                          ),
                      ]
                  else:
                      possible_feature_values = (
                          self.s_categorical_names[ind]
                      )
                      for indc in range(len(possible_feature_values)):
                          cval = possible_feature_values[indc]
                          colName = feature + "=" + cval
                          if (
                              aif360data[rw][
                                  self.s_feature_names_with_one_hot_encoding.index(
                                      colName
                                  )
                              ]
                              == 1.0
                          ):
                              limedata[rw][ind] = indc
              else:
                  # just copy the value as is
                  limedata[rw, ind] = aif360data[
                      rw,
                      self.s_feature_names_with_one_hot_encoding.index(
                          feature
                      ),
                  ]
  
      return limedata
  
file_path: AIF360/aif360/datasets/lime_encoder.py
imports: import sklearn.preprocessing
  import numpy
  from aif360.algorithms import Transformer
label_desc: Use image node_id 3 for calling the LimeEncoder obj's underlying member method code with example usage: obj.transform(aif360data) and returns: limedata