setup_planted_pattern_model: Setup a planted pattern model

Description Usage Arguments Value Examples

View source: R/setup_planted_pattern_model.R

Description

Supplied with a dataframe of planted patterns of b-nodes, will return all the neccesary components to draw from SBM model with set planted structure using draw_from_model().

Usage

1
2
setup_planted_pattern_model(planted_patterns, num_noise_nodes = 10,
  noise_p = 0.2, planted_p_on = 0.95, planted_p_off = 0.05)

Arguments

planted_patterns

Tibble containing planted patterns for node a groups by activating b nodes with 1 or 0 in columns prefixed with pattern b1, b2, .... Additionally a column size is used to control how many a nodes have the planted pattern.

num_noise_nodes

How many additional b nodes with no pattern are added to model?

noise_p

The individual lambda for connections between the noise b-nodes and any a-node.

planted_p_on

The lambda for a planted pattern b-node that has been turned on in a pattern.

planted_p_off

The lambda for a planted pattern b-node that has been turned off in pattern.

Value

List with group membership vectors for both node types (b_a, b_b), and the Lambda matrix for edge behavior (Lambda).

Examples

1
2
3
4
5
6
7
8
my_patterns <- dplyr::tribble(
  ~b1,  ~b2,  ~b3,  ~b4,  ~size,
    1,    1,    0,    0,     10,
    1,    1,    1,    0,     15,
    0,    0,    0,    1,     13,
    0,    0,    1,    1,     24
)
setup_planted_pattern_model(my_patterns, num_noise_nodes = 15)

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