This reference class object is used to plot a Receiver Operating Characteristic curve. An ROC curve is a performance measure of a classification model, created by plotting the true positive rate (TPR) against the false positive rate (FPR) as the decision threshold is varied. The object finds suitable thresholds, calculates FPR and TPR at each, and can calculate the Area Under the Curve (AUC). A vector of true sample classifications (0 or 1) and a vector of estimated probabilities from a model are needed to initialise.
thresholds
A vector of 30 decision thresholds.
FP
A vector of the false positive rate at each threshold.
TP
A vector of the true positive rate at each threshold.
auc
A numeric that is the area under the ROC curve.
calc_auc()
If the AUC has not already be calculated, this calls the calculation.
initialize(y, prob)
Provide sample labels and probabilites, and the FPR and TPR are calculated at 30 decision thresholds
plot_curve()
Plot the ROC curve.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.