Description Usage Arguments Value Examples
One hot encodes a data.frame or data.table to a matrix in efficient manner. Function also adds a couple of package specific attributes to returned matrix so one can pass the result throuh impute_xgboost-function to one_hot_decode-function which then knows how to reverse the one hot encoding. At this point only supported categorical column types are factor and character.
1 |
dt |
a data.table or data.frame wanted to one hot encode |
A matrix created from one hot encoded data.frame or data.table with special attributes for one_hot_decode-function
1 2 3 | mat = one_hot_encode(iris)
mis_mat = generate_na(mat)
imp_mat = impute_xgboost(mis_mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.