plotLearningCurve: plotLearningCurve

Description Usage Arguments Value Examples

View source: R/Plotting.R

Description

Create a plot of the learning curve using the object returned from createLearningCurve.

Usage

1
2
3
4
5
6
7
8
plotLearningCurve(
  learningCurve,
  metric = "AUROC",
  abscissa = "events",
  plotTitle = "Learning Curve",
  plotSubtitle = NULL,
  fileName = NULL
)

Arguments

learningCurve

An object returned by createLearningCurve function.

metric

Specifies the metric to be plotted:

  • 'AUROC' - use the area under the Receiver Operating Characteristic curve

  • 'AUPRC' - use the area under the Precision-Recall curve

  • 'sBrier' - use the scaled Brier score

abscissa

Specify the abscissa metric to be plotted:

  • 'events' - use number of events

  • 'observations' - use number of observations

plotTitle

Title of the learning curve plot.

plotSubtitle

Subtitle of the learning curve plot.

fileName

Filename of plot to be saved, for example 'plot.png'. See the function ggsave in the ggplot2 package for supported file formats.

Value

A ggplot object. Use the ggsave function to save to file in a different format.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# create learning curve object
learningCurve <- createLearningCurve(population,
                                     plpData,
                                     modelSettings)
# plot the learning curve
plotLearningCurve(learningCurve)

## End(Not run)

hxia/plp-git-demo documentation built on March 19, 2021, 1:54 a.m.