plotROCCurves {mlr} | R Documentation |
Plots a ROC curve using ggplot2.
Description
Plots a ROC curve from predictions.
Usage
plotROCCurves(
obj,
measures,
diagonal = TRUE,
pretty.names = TRUE,
facet.learner = FALSE
)
Arguments
obj |
(ThreshVsPerfData) |
measures |
([list(2)' of Measure) |
diagonal |
( |
pretty.names |
( |
facet.learner |
( |
Value
ggplot2 plot object.
See Also
Other plot:
createSpatialResamplingPlots()
,
plotBMRBoxplots()
,
plotBMRRanksAsBarChart()
,
plotBMRSummary()
,
plotCalibration()
,
plotCritDifferences()
,
plotLearningCurve()
,
plotPartialDependence()
,
plotResiduals()
,
plotThreshVsPerf()
Other thresh_vs_perf:
generateThreshVsPerfData()
,
plotThreshVsPerf()
Examples
lrn = makeLearner("classif.rpart", predict.type = "prob")
fit = train(lrn, sonar.task)
pred = predict(fit, task = sonar.task)
roc = generateThreshVsPerfData(pred, list(fpr, tpr))
plotROCCurves(roc)
r = bootstrapB632plus(lrn, sonar.task, iters = 3)
roc_r = generateThreshVsPerfData(r, list(fpr, tpr), aggregate = FALSE)
plotROCCurves(roc_r)
r2 = crossval(lrn, sonar.task, iters = 3)
roc_l = generateThreshVsPerfData(list(boot = r, cv = r2), list(fpr, tpr), aggregate = FALSE)
plotROCCurves(roc_l)