
Check and validate argument encoding_method
Source: R/validate_arg_encoding_method.R
validate_arg_encoding_method.RdInternal function to validate the argument encoding_method of target_encoding_lab().
Usage
validate_arg_encoding_method(
encoding_method = "loo",
overwrite = NULL,
quiet = FALSE,
function_name = NULL
)Arguments
- encoding_method
(optional; character vector or NULL). Name of the target encoding methods. One or several of: "mean", "rank", "loo". If NULL, target encoding is ignored, and
dfis returned with no modification. Default: "loo"- overwrite
(optional; logical) If TRUE, the original predictors in
dfare overwritten with their encoded versions, but only one encoding method, smoothing, white noise, and seed are allowed. Otherwise, encoded predictors with their descriptive names are added todf. Default: FALSE- quiet
(optional; logical) If FALSE, messages are printed. Default: FALSE.
- function_name
(optional, character string) Name of the function performing the argument check. Default: NULL
See also
Other argument_validation:
drop_geometry_column(),
validate_arg_df(),
validate_arg_df_not_null(),
validate_arg_f(),
validate_arg_function_name(),
validate_arg_max_cor(),
validate_arg_max_vif(),
validate_arg_predictors(),
validate_arg_preference_order(),
validate_arg_quiet(),
validate_arg_responses()