Structure Zoo

The structure zoo is a collection of structures. It contains both classic ones such as bloc structures, spatial structures or Watts-Strogatz structures, and less common ones. The zoo is a good place to start if you want to learn about the different types of structures that can be created with the library.

The zoo collection of structures is in the zoo submodule.

Example of usage:

import structify_net.zoo
rank_model = zoo.sort_nestedness(nodes=100)
g = rank_model.generate_graph(epsilon=0.1, m=1000)

There are some useful shortcuts to get collection of structures from the

  • zoo.all_models_no_param: contains all the model functions that do not require any parameter.

  • zoo.all_models_with_m: returns all the model functions that require a parameter m (Expected number of edges).

  • zoo.all_models: returns all the models functions

The function zoo.get_all_rank_models() return instanciated models. See details below.

Individual models

zoo.sort_ER(nodes)

Erdos-Renyi rank model

zoo.sort_distances(nodes[, dimensions, distance])

Rank model based on the distance between nodes

zoo.sort_blocks_assortative(nodes[, blocks])

Rank model based on assortative blocks

zoo.sort_overlap_communities(nodes[, blocks])

Rank model based on overlapping communities

zoo.sort_largest_disconnected_cliques(nodes, m)

A rank model based on the largest disconnected cliques

zoo.sort_stars(nodes)

A rank model based on a star structure

zoo.sort_core_distance(nodes[, dimensions, ...])

Rank model based on the sum of the distance of their nodes to the center of the space.

zoo.sort_spatial_WS(nodes[, k])

Rank model based on a spatial Watts-Strogatz model

zoo.sort_fractal_leaves(nodes[, d])

A rank model based on a fractal structure

zoo.sort_fractal_root(nodes[, d])

A rank model based on a fractal structure

zoo.sort_nestedness(nodes)

Rank model based on nestedness

zoo.sort_fractal_hierarchical(nodes[, d])

Rank model based on a fractal structure

zoo.sort_fractal_star(nodes[, d])

A rank model based on a fractal structure

function to get instanciated model collections

zoo.get_all_rank_models(n, m)

Returns a dictionary of all rank models