Replace all factor features with their dummy variables. Internally model.matrix is used. Non factor features will be left untouched and passed to the result.
createDummyFeatures( obj, target = character(0L), method = "1-of-n", cols = NULL )
Name(s) of the target variable(s).
Only used when
obj is a data.frame, otherwise ignored.
If survival analysis is applicable, these are the names of the survival time and event columns,
so it has length 2.
For multilabel classification these are the names of logical columns that indicate whether
a class label is present and the number of target variables corresponds to the number of
For n factor levels there will be n dummy variables.
There will be n-1 dummy variables leaving out the first factor level of each variable.
Default is “1-of-n”.
(character) Columns to create dummy features for. Default is to use all columns.