variants: Generate variants of a learning system

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/experiments.R

Description

The main goal of this function is to facilitate the generation of different variants of a learning system. The idea is to be able to supply several possible values for a set of parameters of the learner, and then have the function to return a set of learner objects, each consisting of one of the different possible combinations of the variants. This function finds its use in the context of experimental comparisons among learning systems, where we may actually be interested in comparing different parameter settings for each of them.

Usage

1
variants(sys, varsRootName = sys, as.is=NULL, ...)

Arguments

sys

This is the string representing the name of the function of the base learner from which variants should be generated.

varsRootName

By default the names given to each variant will be formed by concatenating the base name of the learner with the terminations: ".v1", ".v2", and so on. This parameter allows you to supply a different base name.

as.is

This is a vector of parameter names (defaults to NULL that are not to be used as source for system variants. This is useful for systems that have parameters that accept as "legal" values sets (e.g. a vector) and that we do not want the function variants to interprete as source values for generating different system variants.

...

The function then accepts any number of named arguments, each with a set of values. These named arguments are supposed to be the names of arguments of the base learner, while the sets of values are the alternatives that you want to consider in the variants generation (see examples below).

Value

The result of this function is a list of learner objects. Each of these objects represents one of the parameter variants of the learner you have supplied.

Author(s)

Luis Torgo ltorgo@dcc.fc.up.pt

References

Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

See Also

learner,experimentalComparison

Examples

1
2
3
4
## Generating several variants of the "rpartXse" learner using different
## values of the paramter "se"

variants('rpartXse',se=c(0,0.5,1))

DMwR documentation built on May 1, 2019, 9:17 p.m.