getprc {SPARRAfairness} | R Documentation |
getprc()
Description
Comprehensive plotting function for precision-recall curve. Also calculates AUPRC and standard error.
Usage
getprc(y, ypred, cv = NULL, res = 100)
Arguments
y |
class labels, 0/1 or logical |
ypred |
predictions Pr(Y=1), numeric vector |
cv |
cross-validation fold assignments, if relevant. Changes estimate of standard error. |
res |
resolution. Returns this many equally-spaced points along the curve. Set res to null to return all points. |
Details
Rather than returning points corresponding to every cutoff, only returns a representative sample of equally-spaced points along the curve.
Does not plot anything. Object can be plotted in a default way.
Value
list containing: ppv, ppv for res points in every cv fold; sens, sensitivity for res points in every cv fold; auc, areas under the curve for each fold and average (note length is 1 greater than number of CV folds); se, standard error for AUC in each fold and standard error for average auc (note length is 1 greater than number of CV folds)
Examples
# See vignette