TruePositiveRate.Rd
Let the set of predictions be described by a logical vector
`pred`, and let the corresponding trues by described in a logical vector
`true` of the same length. Then, the true positive rate is given by the
expression:
sum(pred & true)/sum(true)
. The false positive rate is given by the
expression:
sum(pred & !true)/sum(!true)
. If these expressions do not give a
finite number, NA_real_
is returned.
TruePositiveRate(pred, true) FalsePositiveRate(pred, true)
pred, true | vectors of the same positive length that can be converted to logical. |
---|
a double between 0 and 1 or NA_real_
if the result is not a
finite number.
#> [1] 0.6666667#> [1] 0#> [1] 1#> [1] 1#> [1] 0#> [1] 1#> [1] NA#> [1] NA