Debian Codegraph @

man/ppv.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/ModelMetrics.R
3 \name{ppv}
4 \alias{ppv}
5 \alias{precision}
6 \title{Positive Predictive Value}
7 \usage{
8 ppv(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 Positives / (True Positives + False Positives)
19 }
20 \examples{
21 data(testDF)
22 glmModel <- glm(y ~ ., data = testDF, family="binomial")
23 Preds <- predict(glmModel, type = 'response')
24
25 ppv(testDF$y, Preds, cutoff = 0)
26 precision(testDF$y, Preds, cutoff = 0)
27
28 }