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