Description Usage Arguments Details Examples
This function provides a way to identify the worst predictions when measuring Area Under the ROC curve. Simply put, the worst predictions are the ones with very low or high relative prediction scores (usually probabilities) which relate to the positive and negative samples respectively.
1 | roc_scores(preds, actuals)
|
preds |
vector of predictions (need not be in range [0-1] - only order matters) |
actuals |
vector of actuals - either logical or vector of 1s and 0s |
How it works
First the relative position (between 0 and 1) of each prediction is determined
Next the mean of actuals is determined
For samples whose position is on the correct side of the overall mean, 0 is given
For samples whose position is on the wrong side of the overall mean, its distance from the mean is given
1 2 | roc_scores(c(1,2,3,4), actuals=c(1,1,0,0))
roc_scores(c(0.1, 0.2, 0.3, 0.4), actuals=c(TRUE, FALSE, TRUE, FALSE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.