Learn R Programming

sparsevar (version 1.0.0)

true_negative_rate: True Negative Rate

Description

Computes the True Negative Rate (Specificity) between a reference matrix and an estimated matrix. TNR = TN / (TN + FP), where negatives are zero entries in the reference matrix.

Usage

true_negative_rate(reference_m, a)

Value

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

Arguments

reference_m

the reference (ground truth) matrix

a

the estimated matrix to compare against the reference