class_docstr: Postprocessor for softmax outputs.
docstr: Transform probabilities to zeros and ones.
  
  # Arguments
      data: numpy.ndarray. The output probabilities of the classification
          head.
  
  # Returns
      numpy.ndarray. The zeros and ones predictions.
docstr_tok: ["Transform","probabilities","to","zeros","and","ones",".","#","Arguments","data",":","numpy.ndarray",".","The","output","probabilities","of","the","classification","head",".","#","Returns","numpy.ndarray",".","The","zeros","and","ones","predictions","."]
code: def postprocess(self, data):
      """Transform probabilities to zeros and ones.
  
      # Arguments
          data: numpy.ndarray. The output probabilities of the classification
              head.
  
      # Returns
          numpy.ndarray. The zeros and ones predictions.
      """
      idx = np.argmax(data, axis=-1)
      data = np.zeros(data.shape)
      data[np.arange(data.shape[0]), idx] = 1
      return data
  
file_path: autokeras/autokeras/preprocessors/postprocessors.py
imports: import numpy
  from autokeras.engine import preprocessor
label_desc: Use image node_id 1 for calling the SoftmaxPostprocessor obj's underlying member method code with example usage: obj.postprocess(data) and returns: data