generate_random_lambda: Generate a random lambda matrix

Description Usage Arguments Value Examples

View source: R/generate_random_lambda.R

Description

Given a K_a type a clusters, and K_b type b clusters and a random generator for average number of connections between nodes, generates a tibble that encodes all pairs of cluster types and the average number of connections between them.

Usage

1
generate_random_lambda(K_a, K_b, random_generator = runif)

Arguments

K_a

Number of clusters for node type a

K_b

Number of clusters for node type b

random_generator

Function used to generate average connection values. Defalts to just runif, needs to take a single argument of number of values to generate.

Value

Tibble with three columns: a for id of a node cluster, b for id of b node cluster, and avg_num_cons for the average number of connection between two nodes in cluster a and b respectively.

Examples

1
generate_random_lambda(K_a = 3, K_b = 2, random_generator = function(n) rpois(n, 5))

tbilab/BiSBMSim documentation built on Nov. 5, 2019, 10:01 a.m.