ppv {ModelMetrics} | R Documentation |
Positive Predictive Value
Description
True Positives / (True Positives + False Positives)
Usage
ppv(actual, predicted, cutoff = 0.5)
Arguments
actual |
A vector of the labels |
predicted |
A vector of predicted values |
cutoff |
A cutoff for the predicted values |
Examples
data(testDF)
glmModel <- glm(y ~ ., data = testDF, family="binomial")
Preds <- predict(glmModel, type = 'response')
ppv(testDF$y, Preds, cutoff = 0)
precision(testDF$y, Preds, cutoff = 0)
[Package ModelMetrics version 1.2.2.2 Index]