expSBM (version 1.0)

expSBM_init: expSBM_init

Description

Initialization step for the variational expectation maximization algorithm.

Usage

expSBM_init(edgelist, K, soft = TRUE)

Arguments

edgelist

A matrix with 4 columns: on the first column the sender node, on the second the receiver, on the third either a one or zero to indicate whether it is an interaction or a non-interaction respectively, on the fourth the corresponding exponential length.

K

Number of latent groups.

soft

TRUE or FALSE to indicate whether the function should return a soft clustering or not.

Value

A NxK matrix indicating the partitioning of the nodes.

Examples

Run this code
# NOT RUN {
set.seed(1)
data(high_school)
K <- 4
lambda_init <- rep(1/K,K)
expSBM_init(high_school$edgelist, K)$Z
# }

Run the code above in your browser using DataLab