plotCalibration: Plot calibration data using ggplot2.

Description Usage Arguments Value See Also Examples

Description

Plots calibration data from generateCalibrationData.

Usage

1
2
plotCalibration(obj, smooth = FALSE, reference = TRUE, rag = TRUE,
  facet.wrap.nrow = NULL, facet.wrap.ncol = NULL)

Arguments

obj

[CalibrationData]
Result of generateCalibrationData.

smooth

[logical(1)]
Whether to use a loess smoother. Default is FALSE.

reference

[logical(1)]
Whether to plot a reference line showing perfect calibration. Default is TRUE.

rag

[logical(1)]
Whether to include a rag plot which shows a rug plot on the top which pertains to positive cases and on the bottom which pertains to negative cases. Default is TRUE.

facet.wrap.nrow, facet.wrap.ncol

[integer()]
Number of rows and columns for facetting. Default for both is NULL. In this case ggplot's facet_wrap will choose the layout itself.

Value

ggplot2 plot object.

See Also

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

Other calibration: generateCalibrationData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
lrns = list(makeLearner("classif.rpart", predict.type = "prob"),
            makeLearner("classif.nnet", predict.type = "prob"))
fit = lapply(lrns, train, task = iris.task)
pred = lapply(fit, predict, task = iris.task)
names(pred) = c("rpart", "nnet")
out = generateCalibrationData(pred, groups = 3)
plotCalibration(out)

fit = lapply(lrns, train, task = sonar.task)
pred = lapply(fit, predict, task = sonar.task)
names(pred) = c("rpart", "lda")
out = generateCalibrationData(pred)
plotCalibration(out)

## End(Not run)

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