ppv: Estimating positive predictive value

Description Usage Arguments Details Value Examples

View source: R/classifierTesting.R

Description

Computes the Positive Predictive Value (PPV) or precision of a classifier, by using recorded data vs data predicted by a classifier.

Usage

1
ppv(pred, truth)

Arguments

pred

A logical (T=positive, F=negative) or numeric (1=positive, 0=negative) vector of positives and negatives provided by the classifier.

truth

A logical (T=positive, F=negative) or numeric (1=positive, 0=negative) vector of positives and negatives measured.

Details

Equation used is # True Positives / (# True Positives + # False Positives).

Value

A value from 0 (low PPV) to 1 (high PPV).

Examples

1
2
3
pred_values=sample(c(0,1),replace=T,size=100)
true_values=sample(c(0,1),replace=T,size=100)
ppv(pred_values,true_values)

loublanpain/BMI585FinalProjectLouBlanpain documentation built on Dec. 21, 2021, 11:49 a.m.