Learn R Programming

fdm2id (version 0.9.1)

bootstrap.curves: Plot evaluation curves with bootstrap sampling

Description

Evaluation a classification method according to ROC Curves or Cost Curves using bootstrap approach.

Usage

bootstrap.curves(
  methods,
  x,
  y,
  nruns = 10,
  seed = NULL,
  curve = c("ROC", "Cost"),
  methodparameters = NULL,
  new = TRUE,
  lty = 1,
  names = NULL,
  ...
)

Arguments

methods

The classification or regression method to be evaluated.

x

The dataset (description/predictors), a matrix or data.frame.

y

The target (class labels or numeric values), a factor or vector.

nruns

The number of bootstrap runs.

seed

A specified seed for random number generation (useful for testing different method with the same bootstap samplings).

curve

A character string indicating the type of curve to be plotted.

methodparameters

Method parameters (if null tuning is done by cross-validation).

new

A logical value indicating whether a new plot should be be created or not.

lty

The line type (and color) specified as an integer.

names

Method names.

...

Other specific parameters for the leaning method.

See Also

bootstrap, prediction, performance

Examples

Run this code
# NOT RUN {
require ("datasets")
data (iris)
d = iris
levels (d [, 5]) = c ("+", "+", "-") # Building a two classes dataset
# One method
bootstrap.curves (NB, d [, -5], d [, 5], seed = 0)
# Three methods
bootstrap.curves (c (NB, LDA, LR), d [, -5], d [, 5], seed = 0)
# }

Run the code above in your browser using DataLab