gaussian_random_partition_graph(n, s, v, p_in, p_out, directed=False, seed=None)
A Gaussian random partition graph is created by creating k partitions each with a size drawn from a normal distribution with mean s and variance s/v. Nodes are connected within clusters with probability p_in and between clusters with probability p_out[1]
Note the number of partitions is dependent on s,v and n, and that the last partition may be considerably smaller, as it is sized to simply fill out the nodes [1]
Number of nodes in the graph
Mean cluster size
Shape parameter. The variance of cluster size distribution is s/v.
Probabilty of intra cluster connection.
Probability of inter cluster connection.
Whether to create a directed graph or not
Indicator of random number generation state. See Randomness<randomness>
.
If s is > n If p_in or p_out is not in [0,1]
gaussian random partition graph
Generate a Gaussian random partition graph.
>>> G = nx.gaussian_random_partition_graph(100, 10, 10, 0.25, 0.1)See :
... len(G) 100
The following pages refer to to this document either explicitly or contain code examples using this.
networkx.generators.community.stochastic_block_model
networkx.generators.community.gaussian_random_partition_graph
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them