Learn R Programming

sparsevar (version 1.0.0)

true_positive_rate: True Positive Rate

Description

Computes the True Positive Rate (Sensitivity/Recall) between a reference matrix and an estimated matrix. TPR = TP / (TP + FN), where positives are non-zero entries in the reference matrix.

Usage

true_positive_rate(reference_m, a)

Value

The true positive rate (between 0 and 1), or NA if there are no actual positives in the reference matrix

Arguments

reference_m

the reference (ground truth) matrix

a

the estimated matrix to compare against the reference