% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generateThreshVsPerf.R
\name{plotThreshVsPerf}
\alias{plotThreshVsPerf}
\title{Plot threshold vs. performance(s) for 2-class classification using ggplot2.}
\usage{
plotThreshVsPerf(obj, measures = obj$measures, facet = "measure",
  mark.th = NA_real_, pretty.names = TRUE, facet.wrap.nrow = NULL,
  facet.wrap.ncol = NULL)
}
\arguments{
\item{obj}{[\code{ThreshVsPerfData}]\cr
Result of \code{\link{generateThreshVsPerfData}}.}

\item{measures}{[\code{\link{Measure}} | list of \code{\link{Measure}}]\cr
Performance measure(s) to plot.
Must be a subset of those used in \code{\link{generateThreshVsPerfData}}.
Default is all the measures stored in \code{obj} generated by
\code{\link{generateThreshVsPerfData}}.}

\item{facet}{[\code{character(1)}]\cr
Selects \dQuote{measure} or \dQuote{learner} to be the facetting variable.
The variable mapped to \code{facet} must have more than one unique value, otherwise it will
be ignored. The variable not chosen is mapped to color if it has more than one unique value.
The default is \dQuote{measure}.}

\item{mark.th}{[\code{numeric(1)}]\cr
Mark given threshold with vertical line?
Default is \code{NA} which means not to do it.}

\item{pretty.names}{[\code{logical(1)}]\cr
Whether to use the \code{\link{Measure}} name instead of the id in the plot.
Default is \code{TRUE}.}

\item{facet.wrap.nrow, facet.wrap.ncol}{[\code{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 threshold vs. performance(s) data that has been generated with \code{\link{generateThreshVsPerfData}}.
}
\examples{
lrn = makeLearner("classif.rpart", predict.type = "prob")
mod = train(lrn, sonar.task)
pred = predict(mod, sonar.task)
pvs = generateThreshVsPerfData(pred, list(acc, setAggregation(acc, train.mean)))
plotThreshVsPerf(pvs)
}
\seealso{
Other plot: \code{\link{plotBMRBoxplots}},
  \code{\link{plotBMRRanksAsBarChart}},
  \code{\link{plotBMRSummary}},
  \code{\link{plotCalibration}},
  \code{\link{plotCritDifferences}},
  \code{\link{plotFilterValuesGGVIS}},
  \code{\link{plotLearningCurveGGVIS}},
  \code{\link{plotLearningCurve}},
  \code{\link{plotPartialDependenceGGVIS}},
  \code{\link{plotPartialDependence}},
  \code{\link{plotROCCurves}}, \code{\link{plotResiduals}},
  \code{\link{plotThreshVsPerfGGVIS}}

Other thresh_vs_perf: \code{\link{generateThreshVsPerfData}},
  \code{\link{plotROCCurves}},
  \code{\link{plotThreshVsPerfGGVIS}}
}
