relabel_kl_log | R Documentation |
Relabels the membership vectors of a mixed membership model or mixed membership stochastic blockmodel, using the KL-algorithm proposed by Stephens (2000).
relabel_kl_log(
lphi,
renormalize = FALSE,
maxit = 100L,
nthreads = 0L,
verbose = TRUE
)
lphi |
cube of length |
renormalize |
if |
maxit |
the number of maximum iterations to run, defaults to 100. |
nthreads |
number of threads to use in parallel processing |
verbose |
if TRUE, number of iterations and corresponding KL-distance values are printed. |
OpenMP is enabled if available. Due to overhead, the inner-most loop is parallelized only if the number of latent classes/types is larger than 3.
The function returns a Rcpp::List of three elements.
1) A cube, permuted
, of the same dimensions as phi
but
with the labels permuted; 2) perms
is a S
times K
matrix containing the permutations necessary to produce permuted
from phi
(i.e., the mapping from phi
to permuted
);
and 3) the number of iterations run.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.