random_graph_model#
- random_graph_model(uids, average_degree, seed=None)[source]#
Generate edges for a group of individuals given their ids from an Erdos-Renyi random graph model given the expected average degree.
- Parameters:
uids (list, np.ndarray) – a list or array of the ids of people in the graph
average_degree (float) – the average degree in the generated graph
- Returns:
Fast implementation of the Erdos-Renyi random graph model.
- Return type:
nx.Graph