burt_effective_size

burt_effective_size#

graph_tool.centrality.burt_effective_size(g, weight=None, vprop=None)[git][source]#

Compute Burt’s effective size of the vertices.

Parameters:
gGraph

Graph to be used.

weightEdgePropertyMap (optional, default: None)

Edge weights. If not supplied, every edge has unit weight.

vpropVertexPropertyMap (optional, default: None)

Vertex property map of type double to store the values.

Returns:
sizeVertexPropertyMap

Vertex property map with the effective sizes (nan for vertices without neighbors).

See also

burt_constraint

Burt’s constraint

graph_tool.clustering.local_clustering

Local clustering coefficient

Notes

The effective size [burt-structural-1992] is the number of neighbors of a vertex discounted by their redundancy, i.e. by how much they are tied to the other neighbors,

\[s_i = \sum_{j}\Big(1 - \sum_{q\ne i,j} p_{iq}m_{jq}\Big), \quad m_{jq} = \frac{a_{jq}+a_{qj}}{\max_k (a_{jk}+a_{kj})},\]

with \(p_{iq}\) as in burt_constraint(). For unweighted undirected graphs, it equals \(k_i - 2t_i/k_i\), where \(t_i\) is the number of edges among the neighbors [borgatti-structural-1997]. It takes time \(O(\sum_i k_i^2)\).

Parallel implementation.

If enabled during compilation, this algorithm will run in parallel using OpenMP. See the parallel algorithms section for information about how to control several aspects of parallelization.

References

[burt-structural-1992]

Ronald S. Burt, “Structural Holes: The Social Structure of Competition”, Harvard University Press (1992).

[borgatti-structural-1997]

Stephen P. Borgatti, “Structural holes: Unpacking Burt’s redundancy measures”, Connections 20, 35-38 (1997).

Examples

>>> g = gt.collection.data["karate"]
>>> s = gt.burt_effective_size(g)
>>> print(s.a.argmax(), s.a.max())
33 15.235294117...

The values can be visualized by drawing the network with vertex colors and sizes given by them:

>>> cmap = matplotlib.colors.LinearSegmentedColormap.from_list(
...     "gray-blue", ["#d9d9d9", "#7dabd1"])
>>> gt.graph_draw(g, g.vp.pos, vertex_fill_color=s, vcmap=cmap,
...               vertex_size=gt.prop_to_size(s, mi=5, ma=15),
...               output="burt_effective_size-karate.pdf")
<...>
../_images/burt_effective_size-karate.png

Burt’s effective size of the vertices of Zachary’s karate club network. The vertex colors, from gray to blue, and the vertex sizes increase with the value.#