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.
true_negative_rate(reference_m, a)The true negative rate (between 0 and 1), or NA if there are no actual negatives in the reference matrix
the reference (ground truth) matrix
the estimated matrix to compare against the reference