Description Usage Arguments Details Author(s) Examples
This function launches a Shiny application where the user can interactively manipulate the threshold used in binary classification and view the associated metrics, confusion matrix, ROC and PR curves. The app also allows for optimal threshold calculation according to a weighted version of Youden's J-statistic.
1 | mewtoApp(actuals, probabilities)
|
actuals |
Data of factor type with two levels: "yes" for positive and "no" for negative. |
probabilities |
Data of numeric type which should represent the probabilities of realization of the positive category. |
In the calculation of the optimal threshold, a weighted version of Youden's J-statistic (Youden, 1950) is employed. The optimal cut-off is the threshold that maximizes the distance to the identity (diagonal) line. The function maximizes the metric (w * sensitivity + (1 - w) * specificity), where w is the "weight" parameter chosen through the second slider. After setting the desired value on the optimal threshold slider, the user must press the button "Set" to update the threshold slider above with the optimal value. Metrics will automatically be recalculated based on the user's selection.
Alexandru Monahov, alexandrudezv@gmail.com
1 | mewtoApp(actuals, probabilities)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.