Learn R Programming

mlr (version 2.7)

plotCalibration: Plot calibration data using ggplot2.

Description

Plots calibration data from generateCalibrationData.

Usage

plotCalibration(obj, smooth = FALSE, reference = TRUE, rag = TRUE)

Arguments

Value

ggplot2 plot object.

See Also

Other calibration: generateCalibrationData

Other plot: plotBMRBoxplots, plotBMRRanksAsBarChart, plotBMRSummary, plotCritDifferences, plotFilterValuesGGVIS, plotFilterValues, plotLearningCurveGGVIS, plotLearningCurve, plotPartialPredictionGGVIS, plotPartialPrediction, plotROCCurves, plotROCRCurvesGGVIS, plotROCRCurves, plotThreshVsPerfGGVIS, plotThreshVsPerf

Examples

Run this code
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)

Run the code above in your browser using DataLab