1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generateCalibration.R
\name{plotCalibration}
\alias{plotCalibration}
\title{Plot calibration data using ggplot2.}
\usage{
plotCalibration(
obj,
smooth = FALSE,
reference = TRUE,
rag = TRUE,
facet.wrap.nrow = NULL,
facet.wrap.ncol = NULL
)
}
\arguments{
\item{obj}{(\link{CalibrationData})\cr
Result of \link{generateCalibrationData}.}
\item{smooth}{(\code{logical(1)})\cr
Whether to use a loess smoother.
Default is \code{FALSE}.}
\item{reference}{(\code{logical(1)})\cr
Whether to plot a reference line showing perfect calibration.
Default is \code{TRUE}.}
\item{rag}{(\code{logical(1)})\cr
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 \code{TRUE}.}
\item{facet.wrap.nrow, facet.wrap.ncol}{(\link{integer})\cr
Number of rows and columns for facetting. Default for both is \code{NULL}.
In this case ggplot's \code{facet_wrap} will choose the layout itself.}
}
\value{
ggplot2 plot object.
}
\description{
Plots calibration data from \link{generateCalibrationData}.
}
\examples{
\dontshow{ if (requireNamespace("rpart")) \{ }
\dontshow{ if (requireNamespace("Hmisc")) \{ }
\dontrun{
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)
}
\dontshow{ \} }
\dontshow{ \} }
}
\seealso{
Other plot:
\code{\link{createSpatialResamplingPlots}()},
\code{\link{plotBMRBoxplots}()},
\code{\link{plotBMRRanksAsBarChart}()},
\code{\link{plotBMRSummary}()},
\code{\link{plotCritDifferences}()},
\code{\link{plotLearningCurve}()},
\code{\link{plotPartialDependence}()},
\code{\link{plotROCCurves}()},
\code{\link{plotResiduals}()},
\code{\link{plotThreshVsPerf}()}
Other calibration:
\code{\link{generateCalibrationData}()}
}
\concept{calibration}
\concept{plot}
|