plotROCCurves: Plots a ROC curve using ggplot2.

Description Usage Arguments Value See Also Examples

Description

Plots a ROC curve from predictions.

Usage

1
plotROCCurves(obj, measures, diagonal = TRUE, pretty.names = TRUE)

Arguments

obj

[ThreshVsPerfData]
Result of generateThreshVsPerfData.

measures

[list(2) of Measure]
Default is the first 2 measures passed to generateThreshVsPerfData.

diagonal

[logical(1)]
Whether to plot a dashed diagonal line. Default is TRUE.

pretty.names

[logical(1)]
Whether to use the Measure name instead of the id in the plot. Default is TRUE.

Value

a ggvis plot object.

See Also

Other plot: plotBMRBoxplots, plotBMRRanksAsBarChart, plotBMRSummary, plotCalibration, plotCritDifferences, plotFilterValuesGGVIS, plotLearningCurveGGVIS, plotLearningCurve, plotPartialDependenceGGVIS, plotPartialDependence, plotResiduals, plotThreshVsPerfGGVIS, plotThreshVsPerf

Other thresh_vs_perf: generateThreshVsPerfData, plotThreshVsPerfGGVIS, plotThreshVsPerf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

Najah-lshanableh/R-data-mining2 documentation built on May 6, 2019, 10:11 a.m.