Compute the clustering coefficient for nodes.
For each node find the fraction of possible triangles that exist,
where is the number of triangles through node .
Parameters: | G : graph
nbunch : container of nodes, optional
with_labels: bool, optional :
weights : bool, optional
|
---|---|
Returns: | out : float, list, dictionary or tuple of dictionaries
|
Notes
The weights are the fraction of connected triples in the graph which include the keyed node. Ths is useful for computing transitivity.