relabelTRUE | R Documentation |
Relabels the membership vectors of a mixed membership model or mixed membership stochastic blockmodel, by minimizing the KL-divergence to a priori known true labels.
relabelTRUE(
x,
x_true,
log_p = TRUE,
renormalize = FALSE,
nthreads = 0L,
verbose = TRUE
)
x |
an |
x_true |
matrix of dimension |
log_p |
if TRUE, treats elements in x as log-probabilities |
renormalize |
if TRUE, renormalizes the rows of |
nthreads |
number of threads to use in parallel calculations |
verbose |
if true, prints KL-divergence to true probabilities before and after relabeling |
Returns a list of two elements: permuted
, the relabeled
array and, perms
, the permutation pattern used for each sample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.