validate_encoding_arguments | R Documentation |
target_encoding_lab()
Internal function to validate configuration arguments for target_encoding_lab()
.
validate_encoding_arguments(
df = NULL,
response = NULL,
predictors = NULL,
methods = c("mean", "loo", "rank"),
smoothing = 0,
white_noise = 0,
seed = 0,
overwrite = FALSE,
quiet = FALSE
)
df |
(required; data frame, tibble, or sf) A data frame with responses and predictors. Default: NULL. |
response |
(optional, character string) Name of a numeric response variable in |
predictors |
(optional; character vector) Names of the predictors to select from |
methods |
(optional; character vector or NULL). Name of the target encoding methods. If NULL, target encoding is ignored, and |
smoothing |
(optional; integer vector) Argument of the method "mean". Groups smaller than this number have their means pulled towards the mean of the response across all cases. Default: 0 |
white_noise |
(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: |
seed |
(optional; integer vector) Random seed to facilitate reproducibility when |
overwrite |
(optional; logical) If |
quiet |
(optional; logical) If FALSE, messages generated during the execution of the function are printed to the console Default: FALSE |
list
Other data_validation:
validate_data_cor()
,
validate_data_vif()
,
validate_df()
,
validate_predictors()
,
validate_preference_order()
,
validate_response()
validate_encoding_arguments(
df = vi,
response = "vi_numeric",
predictors = vi_predictors
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.