decimate_mat | R Documentation |
Given a data matrix, M, simulated from a ground-truth pattern matrix, P,
decimate_mat
corrupts M row by row to produce M', such that every row of M'
has every value missing besides exactly one random observation corresponding to each pattern in P
(where the patterns are the rows of P).
decimate_mat(mat, patterns)
mat |
The matrix to be decimated. |
patterns |
The ground truth patterns the matrix was simulated from. |
The decimated matrix
decimate_row
pattern <- t(cbind(c(1,1,1,0,0), c(0,0,0,1,1))) scores <- matrix(rnorm(10), 5, 2) sim_mat <- scores %*% pattern decimated_mat <- decimate_mat(sim_mat, patterns=pattern)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.