Debian Codegraph @

man/tnr.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/ModelMetrics.R
3 \name{tnr}
4 \alias{tnr}
5 \alias{specificity}
6 \title{Specificity, True negative rate}
7 \usage{
8 tnr(actual, predicted, cutoff = 0.5)
9 }
10 \arguments{
11 \item{actual}{A vector of the labels}
12
13 \item{predicted}{A vector of predicted values}
14
15 \item{cutoff}{A cutoff for the predicted values}
16 }
17 \description{
18 True Negatives / (True Negatives + False Positives)
19 }
20 \examples{
21 data(testDF)
22 glmModel <- glm(y ~ ., data = testDF, family="binomial")
23 Preds <- predict(glmModel, type = 'response')
24
25 tnr(testDF$y, Preds, cutoff = 0)
26 specificity(testDF$y, Preds, cutoff = 0)
27
28 }