View source: R/SPARRAfairness_functions.R
getprc | R Documentation |
Comprehensive plotting function for precision-recall curve. Also calculates AUPRC and standard error.
getprc(y, ypred, cv = NULL, res = 100)
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. |
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.
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)
# See vignette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.