Description Usage Arguments Details Value References Examples
This function provides different modes of normalizing an affinity matrix.
1 | normalize_A(A, M_type)
|
A |
a symmetric affinity matrix. Can be dense or sparse from package
|
M_type |
a character string with one of "asym", "sym", or "as_is" (see details). |
All methods for normalization start by removing possible diagonal elements. The available methods are:
asymmetric normalization, which yields a singly stochastic matrix, where rows add to 1.
symmetric normalization, yielding a symmetric matrix.
only removes possible diagonal elements.
A sparse normalized affinity matrix.
Mostafavi, S., Goldenberg, A., & Morris, Q. (2012). Labeling nodes using three degrees of propagation. PloS one, 7(12), e51947.
1 2 3 | # simulate_simple_SBM does not produce self connections
A = as.matrix(simulate_simple_SBM(25L, 0.2, 0.001, 0.25)$A)
all.equal(normalize_A(A, "rm_diag"), A)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.