Description Usage Arguments Details Examples
Create a binary matrix for categorical data with optional noise
1 | binary_enc(x, keys, as_equal = FALSE)
|
x |
The vector to be encoded |
keys |
The values to encode into |
as_equal |
Compare keys versus strings as being equal? Otherwise looks for the 'key' substring in x (default) |
The column of the resulting matrix will represent the encoded values, as specified
in the keys
parameter, retaining the order and accessible in the colnames
of the
resulting matrix. Note that elements of the keys
parameter need to be
unique. This function is used by fit_logistic_signature
1 2 | binary_enc(c('foo', 'bar', 'baz', 'bazinga'), c('foo', 'baz'))
binary_enc(c('foo', 'bar', 'baz', 'bazinga'), c('foo', 'baz'), as_equal=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.