plotROCs: Plot ROC Curve of all listed models

View source: R/plotROCs.r

plotROCsR Documentation

Plot ROC Curve of all listed models

Description

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.

Usage

plotROCs(predictor, models, title)

Arguments

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.

See Also

pROC::roc()

Examples

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"
)

joshuaderekwhite/buildmodels documentation built on April 27, 2022, 3:35 a.m.