Description Usage Arguments Value
Train one-hot encoding
1 2 3 4 | pipe_one_hot_encode(train,
columns = colnames(train)[purrr::map_lgl(train, function(x)
return(!(is.numeric(x) || is.logical(x))))], stat_functions, response,
quantile_trim_threshold = 0, use_pca = FALSE, pca_tol = 0.1)
|
train |
The train dataset, as a data.frame or data.table. Data.tables may be changed by reference. |
columns |
Columns from |
stat_functions |
A (named) list of functions for when you want to use mean-encoding. Don't set it if you want to do regular one-hot encoding. Any function that return a single value from a scalar would do (e.g. quantile, sd). |
response |
String denoting the name of the column that should be used as the response variable. Mandatory |
quantile_trim_threshold |
Sets |
use_pca |
Whether PCA transformation is required. |
pca_tol |
The |
A list containing the transformed train dataset and a trained pipe.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.