Description Usage Arguments Value Author(s)
Uses the target feature to calculate the mean for each level of a categorical feature and encodes it
1 | encodeMean(x, y, catFeats, autoCode = TRUE)
|
x |
[data.frame | Required] Data.frame containing categorical features |
y |
[character | Required] Target feature name |
catFeats |
[character vector | Required] Character vector of categorical features |
autoCode |
[logical | Optional] Should code be generated when running the function |
List containing data.frame with encoded features as well as code when autoCode is TRUE
Xander Horn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.