Name of Target-Encoded Predictor
encoded_predictor_name(
predictor = NULL,
encoding_method = "mean",
smoothing = 0,
white_noise = 0,
seed = 1
)string: predictor name
(required; string) Name of the categorical predictor to encode. Default: NULL
(required, string) Name of the encoding method. One of: "mean", "rank", or "loo". Default: "mean"
(optional; integer) Groups smaller than this number have their means pulled towards the mean of the response across all cases. Ignored by target_encoding_rank() and target_encoding_loo(). Default: 0
(optional; numeric vector) Argument of the methods "mean", "rank", and "loo". Maximum white noise to add, expressed as a fraction of the range of the response variable. Range from 0 to 1. Default: 0.
(optional; integer vector) Random seed to facilitate reproducibility when white_noise is not 0. If NULL, the function selects one at random, and the selected seed does not appear in the encoded variable names. Default: 0
Other target_encoding_tools:
add_white_noise()