Creates a Head for logistic regression.

Inherits From: RegressionHead, Head

Uses sigmoid_cross_entropy_with_logits loss, which is the same as BinaryClassHead. The differences compared to BinaryClassHead are:

  • Does not support label_vocabulary. Instead, labels must be float in the range [0, 1].
  • Does not calculate some metrics that do not make sense, such as AUC.
  • In PREDICT mode, only returns logits and predictions (=tf.sigmoid(logits)), whereas BinaryClassHead also returns probabilities, classes, and class_ids.
  • Export output defaults to RegressionOutput, whereas BinaryClassHead defaults to PredictOutput.

The head expects logits with shape [D0, D1, ... DN, 1]. In many applications, the shape is