Convert label vector to matrix

label_vec2mat(z, K = NULL, sparse = F)

Arguments

z

a label vector

K

number of labels in z

sparse

whether the output should be sparse matrix