generateLearningCurveData: Generates a learning curve.

Description Usage Arguments Value See Also Examples

View source: R/generateLearningCurve.R

Description

Observe how the performance changes with an increasing number of observations.

Usage

1
2
3
generateLearningCurveData(learners, task, resampling = NULL,
  percs = seq(0.1, 1, by = 0.1), measures, stratify = FALSE,
  show.info = getMlrOption("show.info"))

Arguments

learners

[(list of) Learner]
Learning algorithms which should be compared.

task

[Task]
The task.

resampling

[ResampleDesc | ResampleInstance]
Resampling strategy to evaluate the performance measure. If no strategy is given a default "Holdout" will be performed.

percs

[numeric]
Vector of percentages to be drawn from the training split. These values represent the x-axis. Internally makeDownsampleWrapper is used in combination with benchmark. Thus for each percentage a different set of observations is drawn resulting in noisy performance measures as the quality of the sample can differ.

measures

[(list of) Measure]
Performance measures to generate learning curves for, representing the y-axis.

stratify

[logical(1)]
Only for classification: Should the downsampled data be stratified according to the target classes?

show.info

[logical(1)]
Print verbose output on console? Default is set via configureMlr.

Value

[LearningCurveData]. A list containing:

task

[Task]
The task.

measures

[(list of) Measure]
Performance measures.

data

[data.frame] with columns:

  • learner Names of learners.

  • percentage Percentages drawn from the training split.

  • One column for each Measure passed to generateLearningCurveData.

See Also

Other generate_plot_data: generateCalibrationData, generateCritDifferencesData, generateFeatureImportanceData, generateFilterValuesData, generateFunctionalANOVAData, generatePartialDependenceData, generateThreshVsPerfData, getFilterValues, plotFilterValues

Other learning_curve: plotLearningCurveGGVIS, plotLearningCurve

Examples

1
2
3
4
5
r = generateLearningCurveData(list("classif.rpart", "classif.knn"),
task = sonar.task, percs = seq(0.2, 1, by = 0.2),
measures = list(tp, fp, tn, fn), resampling = makeResampleDesc(method = "Subsample", iters = 5),
show.info = FALSE)
plotLearningCurve(r)

riebetob/mlr documentation built on May 20, 2019, 5:58 p.m.