This function computes the true positive rate. It is also known as
recall, sensitivity, probability of detection, power, hit rate (1 - FNR).
Arguments
- TP
number of true positives
- TN
number of true negatives
- FP
number of false positives
- FN
number of false negatives
Value
A numeric value, the true positive rate.
Details
The true positive rate measures the ability of a classifier
of correctly predicting the presence of a condition.
It is defined as
$$sensitivity = recall = \textit{true positive rate} (TPR) = \frac{TP}{P} = \frac{TP}{TP + FN} = 1 - FNR$$
The optimal value is 1 and the worst value is 0.
Author
Alessandro Barberis