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/.
ppCoderN(v, vcol, y, w = NULL)
v | character variable name |
---|---|
vcol | character, independent or input variable |
y | numeric, dependent or outcome variable to predict |
w | row/example weights |
scored training data column