onehot {radiant.model} | R Documentation |
One hot encoding of data.frames
Description
One hot encoding of data.frames
Usage
onehot(dataset, all = FALSE, df = FALSE)
Arguments
dataset |
Dataset to endcode |
all |
Extract all factor levels (e.g., for tree-based models) |
df |
Return a data.frame (tibble) |
Examples
head(onehot(diamonds, df = TRUE))
head(onehot(diamonds, all = TRUE, df = TRUE))
[Package radiant.model version 1.6.6 Index]