labels_to_matrix {c2c} | R Documentation |
Used in get_conf_mat
but might be useful separately
labels_to_matrix(x)
x |
Character or factor vector of class labels |
Binary matrix of class membership.
my_labels <- rep(c("a","b","c","d"), 5)
labels_to_matrix(my_labels)