add_fpr_threshold_line | R Documentation |
Include a threshold line on an specified axis.
add_fpr_threshold_line(threshold)
add_tpr_threshold_line(threshold)
add_threshold_line(threshold, ratio = NULL)
threshold |
A number between 0 and 1, both inclusive, which represents the region bound where to calculate partial area under curve. If If |
ratio |
Ratio in which to display threshold.
|
A ggplot layer instance object.
# Add two threshold line in TPR = 0.9 and FPR = 0.1
plot_roc_curve(iris, response = Species, predictor = Sepal.Width) +
add_threshold_line(threshold = 0.9, ratio = "tpr") +
add_threshold_line(threshold = 0.1, ratio = "fpr")
# Add threshold line in TPR = 0.9
plot_roc_curve(iris, response = Species, predictor = Sepal.Width) +
add_tpr_threshold_line(threshold = 0.9)
# Add threshold line in FPR = 0.1
plot_roc_curve(iris, response = Species, predictor = Sepal.Width) +
add_fpr_threshold_line(threshold = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.