View source: R/target_encoding_methods.R
add_white_noise | R Documentation |
Internal function to add white noise to a encoded predictor to reduce the risk of overfitting when used in a model along with the response.
add_white_noise(
df = NULL,
response = NULL,
predictor = NULL,
white_noise = 0,
seed = 1
)
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 |
predictor |
(required, string) Name of a target-encoded predictor. Default: NULL |
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 |
data frame
Other target_encoding_tools:
encoded_predictor_name()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.