Learn R Programming

deeplearning (version 0.1.0)

convert_categorical: Data proprosess function that covnerts a categorical input to continuous input or vectorize it

Description

Proprosess a data set. It converts categorical data into binary variables if it is unordered or continuous variable from 0 to 1 if it is ordinal

Usage

convert_categorical(x, type = "ordinal", ordered_list = list(), var_name = "var", ...)

Arguments

x
input variable
type
ordinal or other
ordered_list
the rank ordering of an ordinal variable. Users are expected to provide a complete list of the rank ordering. Otherwise, a default rank ordering will be used.
var_name
the name of the input variable. This is used to to create vectorized input variables
...
other inputs