TPR: True Positive Rate (TPR)

View source: R/metrics.R

TPRR Documentation

True Positive Rate (TPR)

Description

This is a function that compares the structure of two matrices A and B. It outputs the number of entries that A and B have in common that are different from zero. A and B need to have the same number of rows and columns

Usage

TPR(A, B, tol = 1e-04)

Arguments

A

A matrix (the estimator).

B

A matrix (assumed to be the ground truth).

tol

tolerance for declaring the entries non zero.

Value

True Positive Rate (nb of values that are non zero in both A and B / (nb of values that are non zero in A))

Examples

A <- matrix(c(1, 0, 0, 1, 1, 0), nrow = 2)
B <- matrix(c(1, 0, 1, 1, 0, 0), nrow = 2)
TPR(A, B)  

ccar3 documentation built on Sept. 16, 2025, 9:11 a.m.

Related to TPR in ccar3...