I have a data frame with some dummy variables that I want to use as a training set for glmnet.
glmnet
As I use glmnet, I want to center and scale the functions using the option preProcessin the function train. I do not want this conversion to apply to dummy variables.
preProcess
train
Is there a way to prevent the conversion of these variables?
There is no (currently) way to do this, other than writing a custom model for this (see the example with PLS and RF near the end).
, , . , , , , . , (, Species* Speciesversicolor Speciesvirginica), .
Species*
Speciesversicolor
Speciesvirginica
. : , (, , , pca). ?