Description Usage Arguments Value Author(s) Examples
View source: R/apply_categorical_mappings.R
Applies feature engineered mapping tables for categorical features. Uses the output from the function map.categorical.encoding to apply these mappings.
1 2 | apply.categorical.mappings(data, categorical.mappings, map.mode = "auto",
progress = TRUE)
|
data |
[required | data.frame] Dataset containing features to apply mappings to |
categorical.mappings |
[required | list] Output from function map.categorical.encoding |
map.mode |
[optional | character | default="auto"] Type of mappings to apply. Options are auto, target, proportional, ordinal, onehot, onehot.prop, report, where auto is a combination between onehot and target. Tracking features are created which flags if a feature has a low proportional category in it. Other types of feature engineering includes, weighted mean noise target encoding, proportional encoding, ordinal proportional encoding, one hot encoding and low proportional one hot encoding which flags all low proportional categories as "other". Report cleans up levels so that the data can be represented in reports and charts. |
progress |
[optional | logical | default=TRUE] Display a progress bar |
Data frame with newly added features and original features
Xander Horn
1 2 | ce <- map.categorical.encoding(data = iris,x = "Species", y = "Petal.Width")
new_iris <- apply.categorical.mappings(data = iris, categorical.mappings = ce)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.