Learn R Programming

crtests (version 0.2.1)

method_prepare: Method-specific data preparation

Description

Generic function for method-specific data preparation, if any is necessary

Usage

method_prepare(method, test, ...)
"method_prepare"(method, test, ...)
"method_prepare"(method, test, ...)

Arguments

method
The regression or classification method that needs specific data preparation.
test
The test being executed, whose data attribute is a list of the train and holdout data sets, that has already been prepared by prepare_data
...
Extra arguments to pass on to class methods

Value

A prepared data.frameidentity(data)

Methods (by class)

  • default: Default function for method-specific data preparation. There is no default method-specific preparation, returns identity.
  • randomForest: Random Forest specific data preparation. Calls group_levels on data, then relevels the holdout set so it has no levels not found in the training set (using prepare_data)