Description Usage Arguments Value Examples
This function takes a given performance metric (precision, accuracy, or recall) that requires a threshold and returns the threshold value that maximizes the specified metric
1 | threshold_finder(func, predictions, outcomes)
|
func |
function, takes in other functions as arguments such as precision, accuracy and recall |
predictions |
list of numerics, predicted values |
outcomes |
list of numerics, actual values/outcomes |
numeric, value from 0 to 1 that is the threshold that maximizes the metric func
1 2 3 4 5 6 | threshold_finder(precision, predictions = FakePredictionResults$est.risk.score,
outcomes = FakePredictionResults$true.risk.bin)
threshold_finder(recall, predictions = FakePredictionResults$est.risk.score,
outcomes = FakePredictionResults$true.risk.bin)
threshold_finder(accuracy, predictions = FakePredictionResults$est.risk.score,
outcomes = FakePredictionResults$true.risk.bin)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.