class_docstr: Transform the labels to integer encodings.
class_docstr_tok: ["Transform","the","labels","to","integer","encodings","."]
docstr: Transform labels to integer encodings.
  
  # Arguments
      dataset: tf.data.Dataset. The dataset to be transformed.
  
  # Returns
      tf.data.Dataset. The transformed dataset.
docstr_tok: ["Transform","labels","to","integer","encodings",".","#","Arguments","dataset",":","tf.data.Dataset",".","The","dataset","to","be","transformed",".","#","Returns","tf.data.Dataset",".","The","transformed","dataset","."]
code: def transform(self, dataset):
      """Transform labels to integer encodings.
  
      # Arguments
          dataset: tf.data.Dataset. The dataset to be transformed.
  
      # Returns
          tf.data.Dataset. The transformed dataset.
      """
      dataset = super().transform(dataset)
      dataset = dataset.map(lambda x: tf.expand_dims(x, axis=-1))
      return dataset
  
file_path: autokeras/autokeras/preprocessors/encoders.py
imports: import numpy
  import tensorflow
  from autokeras.engine import preprocessor
label_desc: Use image node_id 1 for calling the LabelEncoder obj's underlying member method code with example usage: obj.transform(dataset) and returns: dataset