Implements several indices to assess the balancedness of a network.
balance_score(g, method = "triangles")
string indicating the method to be used. See details for options
The method parameter can be one of
Fraction of balanced triangles. Maximal (=1) if all triangles are balanced.
\(\sum exp(\lambda_i) / \sum exp(\mu_i)\)
The frustration index assumes that the network can be partitioned into two groups, where intra group edges are positive and inter group edges are negative. The index is defined as the sum of intra group negative and inter group positive edges. Note that the problem is NP complete and only an upper bound is returned (based on simulated annealing). Exact methods can be found in the work of Aref. The index is normalized such that it is maximal (=1) if the network is balanced.
Estrada, E. (2019). Rethinking structural balance in signed social networks. Discrete Applied Mathematics.
Samin Aref, Mark C Wilson (2018). Measuring partial balance in signed networks. Journal of Complex Networks, 6(4): 566–595, https://doi.org/10.1093/comnet/cnx044