TN {measures}R Documentation

True negatives

Description

Sum of correctly classified observations in the negative class. Also called correct rejections.

Usage

TN(truth, response, negative)

Arguments

truth

vector of true values

response

vector of predicted values

negative

negative class

Examples

n = 20
set.seed(125)
truth = as.factor(sample(c(1,0), n, replace = TRUE))
probabilities = runif(n)
response = as.factor(as.numeric(probabilities > 0.5))
negative = 0
TN(truth, response, negative)

[Package measures version 0.3 Index]