Description Usage Arguments Value Examples
This function takes the predictions of a model, (can be either binary 0 or 1, or continous numeric [0,1]) and calculates the accuracy based on the predictions. Given that predictions need to binary for the accuracy calculates you need to pass in a threshold to but the predictions off. If the predictions are already binary, then pass in .5 Note: if there are imbalanced positives and negatives this metric might not be that useful
1 | accuracy(predictions, outcomes, threshold)
|
predictions |
list of numerics, predicted values |
outcomes |
list of numerics, actual values/outcomes |
threshold |
numeric, value between 0 - 1 to cut predictions that are continous within binary 0s and 1s |
numeric, returns accuracy value
1 2 | accuracy(predictions = FakePredictionResults$est.risk.score,
outcomes = FakePredictionResults$true.risk.bin, threshold = .5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.