code: def encoder_dataset(df, drop=None, dimesions=20):
      if drop:
          train_scaled = minmax_scale(
              df.drop(drop, axis=1).values, axis=0
          )
      else:
          train_scaled = minmax_scale(df.values, axis=0)
  
      # define the number of encoding dimensions
      encoding_dim = dimesions
      # define the number of features
      ncol = train_scaled.shape[1]
      input_dim = tf.keras.Input(shape=(ncol,))
  
      # Encoder Layers
      encoded1 = tf.keras.layers.Dense(3000, activation="relu")(
          input_dim
      )
      encoded2 = tf.keras.layers.Dense(2750, activation="relu")(
          encoded1
      )
      encoded3 = tf.keras.layers.Dense(2500, activation="relu")(
          encoded2
      )
      encoded4 = tf.keras.layers.Dense(750, activation="relu")(encoded3)
      encoded5 = tf.keras.layers.Dense(500, activation="relu")(encoded4)
      encoded6 = tf.keras.layers.Dense(250, activation="relu")(encoded5)
      encoded7 = tf.keras.layers.Dense(encoding_dim, activation="relu")(
          encoded6
      )
  
      encoder = tf.keras.Model(inputs=input_dim, outputs=encoded7)
      encoded_input = tf.keras.Input(shape=(encoding_dim,))
  
      encoded_train = pd.DataFrame(
          encoder.predict(train_scaled), index=df.index
      )
      encoded_train = encoded_train.add_prefix("encoded_")
      if drop:
          encoded_train = pd.concat((df[drop], encoded_train), axis=1)
  
      return encoded_train
  
file_path: deltapy/deltapy/mapper.py
imports: from sklearn.decomposition import PCA, IncrementalPCA, KernelPCA
  from sklearn.kernel_approximation import AdditiveChi2Sampler
  from sklearn.cross_decomposition import CCA
  from sklearn.manifold import LocallyLinearEmbedding
  from sklearn.preprocessing import minmax_scale
  from sklearn import datasets, cluster
  from sklearn.neighbors import NearestNeighbors
  import numpy
  import pandas
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: encoder_dataset(df, drop, dimesions) and returns: encoded_train