de_one_hot_encoding {creditmodel}R Documentation

Recovery One-Hot Encoding

Description

de_one_hot_encoding is for one-hot encoding recovery processing

Usage

de_one_hot_encoding(dat_one_hot, cat_vars = NULL, na_act = TRUE, note = FALSE)

Arguments

dat_one_hot

A dat frame with the one hot encoding variables

cat_vars

variables to be recovery processed, default is null, if null, find these variables through regular expressions .

na_act

Logical,If true, the missing value is assigned as "missing", if FALSE missing value is omitted, the default is TRUE.

note

Logical.Outputs info.Default is TRUE.

Value

A dat frame with the one hot encoding recorery character variables

See Also

one_hot_encoding

Examples

#one hot encoding
dat1 = one_hot_encoding(dat = UCICreditCard,
cat_vars = c("SEX", "MARRIAGE"),
merge_cat = TRUE, na_act = TRUE)
#de one hot encoding
dat2 = de_one_hot_encoding(dat_one_hot = dat1,
cat_vars = c("SEX","MARRIAGE"),
na_act = FALSE)

[Package creditmodel version 1.3.1 Index]