true_positive_rate: True Positive Rate

View source: R/utils.R

true_positive_rateR Documentation

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)

Arguments

reference_m

the reference (ground truth) matrix

a

the estimated matrix to compare against the reference

Value

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


sparsevar documentation built on Feb. 5, 2026, 1:07 a.m.