Calculates the number of false positives

metric_false_positives(..., thresholds = NULL, name = NULL, dtype = NULL)



Passed on to the underlying metric. Used for forwards and backwards compatibility.


(Optional) Defaults to 0.5. A float value or a list of float threshold values in [0, 1]. A threshold is compared with prediction values to determine the truth value of predictions (i.e., above the threshold is true, below is false). One metric value is generated for each threshold value.


(Optional) string name of the metric instance.


(Optional) data type of the metric result.


A (subclassed) Metric instance that can be passed directly to compile(metrics = ), or used as a standalone object. See ?Metric for example usage.


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

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

See also