Please see https://win-vector.com/2017/09/25/custom-level-coding-in-vtreat/ and https://win-vector.com/2017/09/28/partial-pooling-for-lower-variance-variable-encoding/.
ppCoderC(v, vcol, y, w = NULL)
v | character variable name |
---|---|
vcol | character, independent or input variable |
y | logical, dependent or outcome variable to predict |
w | row/example weights |
scored training data column