| nmfkc.class | R Documentation |
nmfkc.class converts a categorical or factor vector into a class matrix
(one-hot encoded representation), where each row corresponds to a category
and each column corresponds to an observation.
nmfkc.class(x)
x |
A categorical vector or a factor. |
A binary matrix with one row per unique category and one column per observation. Each column has exactly one entry equal to 1, indicating the category of the observation.
nmfkc
# Example.
Y <- nmfkc.class(iris$Species)
Y[,1:6]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.