#' plot.roc.curve
#'
#' @description: auxilia curva roc
#' @param predict
#' @param text
#'
#' @return
#' @export
#'
#' @examples
#'
#'
plot.roc.curve <- function(predictions, title.text){
perf <- performance(predictions, "tpr", "fpr")
plot(perf, col = "black", lty = 1, lwd = 2,
main = title.text, cex.main = 0.6,
cex.lab = 0.8, xaxs="i", yaxs="i")
abline(0,1, col = "red")
auc <- performance(predictions, "auc")
auc <- unlist(slot(auc, "y.values"))
auc <- round(auc,2)
legend(0.4,0.4, legend = c(paste0("AUC: ",auc)), cex = 0.6, bty = "n", box.col = "white")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.