Converts unique cluster assignment stored in a length
N label vector into a N \times K Boolean
matrix of mixture weights.
states2weight_matrix(states, num.states.total = NULL)
a vector of length N with the state
total number of states. If
NULL, then the maximum of states is chosen
ss <- sample.int(5, 10, replace = TRUE)
WW <- states2weight_matrix(ss)
image2(WW, col = "RdBu", xlab = "States", ylab = "Samples", axes = FALSE)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.