gen_adjmat: Generate a network edge probability matrix and a random...

Description Usage Arguments Value

Description

Generate a network edge probability matrix from a specified network model with community structure and a random adjacency matrix

Usage

1
2
3
gen_adjmat(n, k, sizes = NULL, B = NULL, p_min, p_max, q_min, q_max,
  type = c("plantedsbm", "sbm", "assortative"), self_loop = FALSE,
  perm = FALSE)

Arguments

n

the number of nodes

k

the number of communities

sizes

a vector of community sizes

B

a matrix of community-wise edge probabilities. Ff supplied, it overrides p_min, p_max, q_min, q_max, and type arguments.

p_min

the minimum within-community edge probability

p_max

the maximum within-community edge probability. It has no effect if argument type is "plantedsbm".

q_min

the minimum between-community edge probability. It has no effect if argument type is "plantedsbm".

q_max

the maximum between-community edge probability

type

type of network model. It has to be "plantedsbm", "sbm", or "assortative". It has no effect if argument B is supplied.

self_loop

a logical indicating whether to allow self loops in the network

perm

a logical indicating whether to randomly permute the generated edge probability matrix, random adjacency matrix, membership matrix, and label

Value

A list with the following components:

adjmat

a random adjacency matrix if sample is TRUE

probmat

a network edge probability matrix

membermat

the membership matrix according to node labels

label

the label vector of nodes


zhifeiyan/bfcluster documentation built on May 4, 2019, 11:21 p.m.