plotROCs | R Documentation |
Takes in a list of models and returns the ROC curves associated with each. All of the ROC curves are plotted on a single plot.
plotROCs(predictor, models, title)
predictor |
The vector of the validation set that contains the true values of the dependent variable. |
models |
A list of all models that the ROC curves should be plotted for. Each model needs to contain at a minimum a value for name which is what will be included in the legend, as well as a value for prob, in which the probabilities of the model classifications should be passed through. |
title |
The title that should be displayed for the plot. |
pROC::roc()
plotROCs(predictor = weather.test$RainTomorrow, models = list( list(name = "Linear SVM", prob = prob.linear), list(name = "Gaussian SVM", prob = prob.radial), list(name = "Random Forest", prob = prob.rf), list(name = "Gradient Boosted Tree", prob = prob.xgb) ), title = "ROC Curves for Predicition Models of Rain Tomorrow" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.