Last data update: 2014.03.03

R: the MAIN function for interactive use.
preproR Documentation

the MAIN function for interactive use.

Description

prepro() takes data, transforms it according to the given preprocessor and computes statistics of the transformed data. The main use case is the chaining of the preprocessors as show in the examples below.

Usage

prepro(dataobject, classname, model = "rpart", nholdout = 2, cores = 1)

Arguments

dataobject

(sub class/ data frame/ DataClass) object

classname

(character) name of preprocessor (i.e. PreprocessorClass sub class as defined by setpreprocessor())

model

(character) caret model name, note: the required model library must be attached, defaults to "rpart"

nholdout

(integer) number of holdout rounds used in computation of classification accuracy, must be two or more, defaults to 2

cores

(integer) number of cores used in parallel processing of holdout rounds, defaults to 1

Details

If a data object has missing values, one of the imputation preprocessors must be applied first.

Value

object of PreprocessorClass sub class

Examples

## a <- prepro(iris, "basicscale")
## b <- prepro(a, "rfselect75")
## d <- prepro(iris, "basicscale", "rf", nholdout=20, cores=2)

Results