Generation: Generation of multilayer networks

multinet.generationR Documentation

Generation of multilayer networks

Description

The grow_ml function generates a multilayer network by letting it grow for a number of steps, where for each step three events can happen: (1) evolution according to internal dynamics (in which case a specific internal evolution model is used), (2) evolution importing edges from another layer, and (3) no action. The functions evolution_pa_ml and evolution_er_ml define, respectively, an evolutionary model based on preferential attachment and an evolutionary model where edges are created by choosing random end points, as in the ER random graph model.

Usage

grow_ml(num.actors, num.steps, models, pr.internal, pr.external, dependency)
evolution_pa_ml(m0,m)
evolution_er_ml(n)

Arguments

num.actors

The number of actors from which new nodes are selected during the generation process.

num.steps

Number of timestamps.

models

A vector containing one evolutionary model for each layer to be generated. Evolutionary models are defined using the evolution_*_ml functions.

pr.internal

A vector with (for each layer) the probability that at each step the layer evolves according to the internal evolutionary model.

pr.external

A vector with (for each layer) the probability that at each step the layer evolves importing edges from another layer.

dependency

A matrix LxL where element (i,j) indicates the probability that layer i will import an edge from layer j in case an external event is triggered.

m0

Initial number of nodes.

m

Number of edges created for each new vertex joining the network.

n

Number of vertices (created at the beginning, before starting adding edges).

Value

grow_ml returns a multilayer network. evolution_*_ml return evolutionary models that are used by grow_ml to decide how each layer should grow.

References

Magnani, Matteo, and Luca Rossi. 2013. Formation of Multiple Networks. In Social Computing, Behavioral-Cultural Modeling and Prediction, 257-264. Springer Berlin Heidelberg.

See Also

multinet.predefined, multinet.IO

Examples

# we generate a network with two layers, one growing according
# to the Preferential Attachment model and one growing by selecting
# new edges uniformly at random.
models <- c(evolution_pa_ml(3,1), evolution_er_ml(50))
# all the probability vectors must have the same number of
# fields, one for each layer: two in this example
# by defining pr.internal and pr.external, we are also implicitely defining
# pr.no.action (1 minus the other probabilities, for each field/layer).
pr_external <- c(.5,0)
pr_internal <- c(.5,.5)
# each layer will import edges from the other if needed
# (not the second layer in this example: it has 0 probability of external events)
dependency <- matrix(c(0,1,1,0),2,2)
# 100 steps of network growing, adding actors from a pool of 100
grow_ml(100, 100, models, pr_internal, pr_external, dependency)

multinet documentation built on Nov. 2, 2024, 5:06 p.m.