tf.keras.metrics.TruePositives

Calculates the number of true positives.

Inherits From: Metric, Layer, Module

Used in the notebooks

Used in the tutorials

If sample_weight is given, calculates the sum of the weights of true positives. This metric creates one local variable, true_positives that is used to keep track of the number of true positives.

If sample_weight is None, weights default to 1. Use sample_weight of 0 to mask values.

thresholds (Optional) Defaults to 0.5. A float value or a python list/tuple of float threshold values in [0, 1]. A threshold is com