variants: Generate variants of a learning system

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

View source: R/experiments.R


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.


variants(sys, varsRootName = sys,, ...)



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


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.

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).


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.


Luis Torgo


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

See Also



## Generating several variants of the "rpartXse" learner using different
## values of the paramter "se"


DMwR documentation built on May 29, 2017, 12:06 p.m.

Search within the DMwR package
Search all R packages, documentation and source code