one_hot_to_seq | R Documentation |
Return character sequence corresponding to one-hot elements in matrix or tensor.
one_hot_to_seq(
m,
vocabulary = c("A", "C", "G", "T"),
amb_enc = "zero",
amb_char = "N",
paste_chars = TRUE
)
m |
One-hot encoding matrix or 3d array where each element of first axis is one-hot matrix. |
vocabulary |
Vector of allowed characters. Characters outside vocabulary get encoded as specified in |
amb_enc |
Either |
amb_char |
Char to use for oov positions. |
paste_chars |
Whether to return vector or single sequence. |
A string.
m <- matrix(c(1,0,0,0,0,1,0,0), 2)
one_hot_to_seq(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.