Reference

Data Structures

Data structures for handling various forms of multilayer networks.

MultilayerNetwork([aspects, noEdge, ...])

General multilayer network with a tensor-like interface.

MultiplexNetwork([couplings, directed, ...])

Multiplex network as a special case of multilayer network.

net.MultilayerNode(node, mnet[, layers])

A node in a MultilayerNetwork.

Network Models

Functions for generating multilayer and multiplex networks using various network models.

er(n[, p, edges])

Multiplex Erdos-Renyi model.

conf(degs[, degstype, couplings])

Independent configuration model for multiplex networks.

single_layer_er(net, nodes[, p, edges])

Generates a realization of a monoplex Erdos-Renyi network.

single_layer_conf(net, degs[, degstype])

Generates a realization of configuration model network.

er_partially_interconnected(nodes, ps[, ...])

Generate multiplex Erdos-Renyi network which is not fully interconnected.

full(nodes, layers[, couplings])

Generate a full multiplex network.

full_multilayer(nodes, layers)

Generate a full multilayer network.

er_multilayer(nodes, layers, p[, randomWeights])

Generate multilayer Erdos-Renyi network.

Transforming Networks

Functions taking in networks and returning transformed versions of them.

aggregate(net, aspects[, newNet, selfEdges])

Reduces the number of aspects by aggregating them.

subnet(net, nodes, *layers, **kwargs)

Returns an induced subgraph with given set of nodes and layers.

supra_adjacency_matrix(net[, includeCouplings])

Returns the supra-adjacency matrix and a list of node-layer pairs.

Reading and Writing Networks

Functions for reading and writing networks in different file formats.

read_edge_file(inputfile[, couplings, ...])

Read a multiplex file following the syntax.

write_edge_file(net, outputfile[, sep, ...])

Write a multiplex file following the syntax.

read_ucinet(netinput[, couplings, ...])

Read a network in UCINET DL format.

write_edge_files(net, outputfiles[, ...])

Write a multiplex file separated into files for layers, edges, and nodes.

write_json(net[, outputfile])

Write a multiplex network with a single aspect in a JSON format.

Basic Network Diagnostics

degs(net[, degstype])

Returns the degree distribution of a multilayer network.

density(net)

Returns the density of the network.

multiplex_degs(net[, degstype])

Returns a dictionary of degree distributions of each intra-layer network of a multiplex network.

multiplex_density(net)

Returns a dictionary of densities of each intra-layer network of a multiplex network.

Clustering Coefficients

Clustering coefficients in multiplex networks.

lcc(net, node[, undefReturn])

The local clustering coefficient of a node in monoplex network.

cc_zhang(net, node[, undefReturn])

Zhang's local clustering coefficient of a node in weighted monoplex network.

gcc_zhang(net)

Global version of the Zhang's clustering coefficient of a node in weighted monoplex network.

cc_onnela(net, node[, undefReturn])

Onnela's local clustering coefficient of a node in weighted monoplex network.

cc_barrat(net, node[, undefReturn])

Barrat's local clustering coefficient of a node in weighted monoplex network.

cc_barrett(net, node, anet[, undefReturn])

Barrett's local clustering coefficient of a node in multiplex network.

lcc_brodka(net, node[, anet, threshold, ...])

The "cross-layer clustering coefficient" defined by Brodka et al.

cc_sequence(net, node)

Returns number of triangles and connected tuples around the node for each layer.

lcc_aw(net, node, layer[, w1, w2, w3, ...])

The local version of the alternating walker clustering coefficient for multiplex networks.

avg_lcc_aw(net[, w1, w2, w3, returnCVector, ...])

Average value of the local version of the alternating walker clustering coefficient for multiplex networks.

gcc_aw(net[, w1, w2, w3, returnCVector])

The global version of the alternating walker clustering coefficient for multiplex networks.

sncc_aw(net, node[, w1, w2, w3, ...])

The super-node version of the alternating walker clustering coefficient for multiplex networks.

elementary_cycles(net[, node, layer, anet])

Returns the elementary 3-cycle counts in a multiplex network.

Visualization

Package for visualizing multilayer networks.

draw(net[, layout, layershape, azim, elev, ...])

Visualize a multilayer network.

webplot(net[, outputfile])

Create a 3D visualization of a multiplex network for web using D3.

Isomorphisms

Package for isomorphisms in multilayer networks.

The package is based on reducing multilayer network isomorphism problems to graph isomorphism problems. The graph isomorphism problems can be solved using different backends. Currently the following backends are supported (the functions these backends can be used for are in parenthesis):

  • NetworkX : “nx” (is_isomorphic, get_isomorphism)

  • bliss-bind : “bliss_bind” (is_isomorphic, get_isomorphism, get_automorphism_generators, get_complete_invariant)

is_isomorphic(net1, net2[, allowed_aspects, ...])

Checks if the two networks are isomorphic.

get_complete_invariant(net[, ...])

Returns a value that is a complete invariant under multilayer network isomorphism.

get_automorphism_generators(net[, ...])

Returns automorphism generators for the given network.

get_isomorphism(net1, net2[, ...])

Returns an isomorphism between net1 and net2 if possible.

Graphlets

Package for multiplex graphlet analysis.

If you use this package, please cite:

Sallamari Sallmen, Tarmo Nurmi, and Mikko Kivelä. “Graphlets in multilayer networks.” Journal of Complex Networks 10.2 (2022): cnac005. https://doi.org/10.1093/comnet/cnac005

graphlets(n, layers[, n_l, couplings, ...])

Generate graphlets up to n nodes

automorphism_orbits(nets[, allowed_aspects])

Computes the node automorphism orbits of each network in nets

orbit_equations(n, nets, auts, invs[, ...])

Generate orbit equations for up to n nodes

orbit_counts_all(net, n, nets, invs, auts, ...)

Compute the orbit counts for all the nodes in net.

GCM(orbits)

Returns the graphlet correlation matrix

GCD(gcm1, gcm2)

Graphlet correlation distance between two networks

Sampling

Package for sampling multilayer subgraphs.

sample_multilayer_subgraphs_esu(network, results)

A one-aspect multilayer version of the Rand-EnumerateSubgraphs (Rand-ESU) algorithm introduced by Wernicke [1].

default_check_reqs(network, nodelist, ...[, ...])

Checks whether a multilayer induced subgraph of the form [nodelist][layerlist] is connected, whether it has no empty layers or nodes, and whether it fulfills the given sizes and intersections requirements.

relaxed_check_reqs(network, nodelist, layerlist)

Checks whether a multilayer induced subgraph of the form [nodelist][layerlist] is connected and does not contain any empty layers or nodes.