#

Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

#

networkx.algorithms.bipartite.generators.preferential_attachment_graph

preferential_attachment_graph(aseq, p, create_using=None, seed=None)[source]

Create a bipartite graph with a preferential attachment model from a given single degree sequence.

The graph is composed of two partitions. Set A has nodes 0 to (len(aseq) - 1) and set B has nodes starting with node len(aseq). The number of nodes in set B is random.

Parameters
  • aseq (list) – Degree sequence for node set A.

  • p (float) – Probability that a new bottom node is added.

  • create_using (NetworkX graph instance, optional) – Return graph of this type.

  • seed (integer, random_state, or None (default)) – Indicator of random number generation state. See Randomness.

References

1

Guillaume, J.L. and Latapy, M., Bipartite graphs as models of complex networks. Physica A: Statistical Mechanics and its Applications, 2006, 371(2), pp.795-813.

2

Jean-Loup Guillaume and Matthieu Latapy, Bipartite structure of all complex networks, Inf. Process. Lett. 90, 2004, pg. 215-221 https://doi.org/10.1016/j.ipl.2004.03.007

Notes

The nodes are assigned the attribute ‘bipartite’ with the value 0 or 1 to indicate which bipartite set the node belongs to.

This function is not imported in the main namespace. To use it use nx.bipartite.preferential_attachment_graph