Dummy variables and preProcess

前端 未结 1 1816
半阙折子戏
半阙折子戏 2021-01-02 18:40

I have a data frame with some dummy variables that I want to use as training set for glmnet.

Since I\'m using glmnet I want to center and

相关标签:
1条回答
  • 2021-01-02 19:37

    There's not (currently) a way to do this besides writing a custom model to do so (see the example with PLS and RF near the end).

    I'm working on a method to specify which variables get which pre-processing method. However, with dummy variables, this is tough since you might need to specific the names of a lot of predictors whose columns are not in the current dat set. The idea is to be able to use wildcards (e.g. Species* to capture Speciesversicolor and Speciesvirginica) but the code isn't quite there yet.

    Max

    0 讨论(0)
提交回复
热议问题