gs.sims.siem: Structured Independent Edge Model Graphs

Description Usage Arguments Value Author(s) Examples

Description

A function to simulate graphs from the Structured Independent Edge Model (SIEM).

Usage

1
2
3
gs.sims.siem(n, v, priors = c(0.5, 0.5), C = list(list(seq(1, floor(v^2/2)),
  seq(floor(v^2/2) + 1, v^2)), list(seq(1, floor(v^2/2)), seq(floor(v^2/2) + 1,
  v^2))), P = list(c(0.5, 0.5), c(0.5, 0.5)))

Arguments

n

the number of graphs.

v

the number of vertices.

priors

the composition of the graphs in each class as a length K vector. Defaults to c(0.5, 0.5). Note that K=length(priors) is the number of classes of graphs, and sum(priors) will be normalized to 1.

C

the community membership of each edge in each class as a length K list of length(r) lists, where r is the number of communities for class i. Note that K=length(C) is the number of classes of graphs, union(C[[i]][[j]]) over all j communities for class i should be 1:v^2, and intersect(C[[i]][[j]]) for class i over all j communities should be empty. Defaults to list(list(seq(1, floor(n/2)), seq(floor(n/2)+1, n)), list(seq(1, floor(n/2)),seq(floor(n/2)+1, n))).

P

the matrix of probabilities, where P[[i]][k] corresponds to the probability of an edge for class i in edge community k. Defaults to list(c(0.5, 0.5), c(0.5, 0.5)).

Value

An object of class "Simulation" containing the following:

graphs

[[n]][v, v] the n graphs with v vertices as a list of adjacency matrices.

Y

[n] the class labels for each of the n graphs.

Author(s)

Eric Bridgeford

Examples

1
2
library(graphstats)
data <- gs.sims.siem(100, 10)  # simulate 100 graphs with 10 vertices from the default model

neurodata/graphstats documentation built on May 14, 2019, 5:19 p.m.