de_one_hot_encoding: Recovery One-Hot Encoding

Description Usage Arguments Value See Also Examples

View source: R/data_transformation.R

Description

de_one_hot_encoding is for one-hot encoding recovery processing

Usage

1
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

1
2
3
4
5
6
7
8
#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)

creditmodel documentation built on Jan. 25, 2021, 5:08 p.m.