Description Usage Arguments Details Author(s) Examples
This function calculates the optimal threshold according to a weighted version of Youden's J-statistic.
1 | mewtoThresh(actuals, probabilities, weight = 0.5)
|
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. |
weight |
A numeric value corresponding to the importance attributed to sensitivity, or formulated differently, to the maximization of the true positives rate. This value should be in the interval 0 ; 1. |
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. Metrics will automatically be recalculated based on the user's selection.
Alexandru Monahov, alexandrudezv@gmail.com
1 2 | mewtoThresh(actuals, probabilities, weight = 0.5) # Original Youden's J-statistic.
mewtoThresh(actuals, probabilities, weight = 0.9) # Favor sensitivity greatly over specificity.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.