Learn R Programming

mlr (version 2.10)

plotThreshVsPerfGGVIS: Plot threshold vs. performance(s) for 2-class classification using ggvis.

Description

Plots threshold vs. performance(s) data that has been generated with generateThreshVsPerfData.

Usage

plotThreshVsPerfGGVIS(obj, interaction = "measure", mark.th = NA_real_,
  pretty.names = TRUE)

Arguments

obj
[ThreshVsPerfData] Result of generateThreshVsPerfData.
interaction
[character(1)] Selects “measure” or “learner” to be used in a Shiny application making the interaction variable selectable via a drop-down menu. This variable 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. Note that if there are multiple learners and multiple measures interactivity is necessary as ggvis does not currently support facetting or subplots. The default is “measure”.
mark.th
[numeric(1)] Mark given threshold with vertical line? Default is NA which means not to do it.
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, plotROCCurves, plotResiduals, plotThreshVsPerf Other thresh_vs_perf: generateThreshVsPerfData, plotROCCurves, plotThreshVsPerf

Examples

Run this code
## Not run: ------------------------------------
# lrn = makeLearner("classif.rpart", predict.type = "prob")
# mod = train(lrn, sonar.task)
# pred = predict(mod, sonar.task)
# pvs = generateThreshVsPerfData(pred, list(tpr, fpr))
# plotThreshVsPerfGGVIS(pvs)
## ---------------------------------------------

Run the code above in your browser using DataLab