SignedFuzzyMod: Signed Fuzzy Modularity of a community structure of a graph

View source: R/SignedFuzzyMod.R

SignedFuzzyModR Documentation

Signed Fuzzy Modularity of a community structure of a graph

Description

Function calculates the fuzzy modularity of a (disjoint or non-disjoint division) of a graph into subgraphs for signed weighted networks.

Usage

SignedFuzzyMod(netinput, membassigned)

Arguments

netinput

The input graph.

membassigned

Numeric vector or list indicating the membership structure.

Details

For signed weighted networks (i.e. networks with positive and negative edges), the calculation of the modularity Q is problematic. Gomez, Jensen, and Arenas (2009) explain that, when calculating modularity Q for unweighted (Newman & Girvan, 2004) or weighted networks (Fan, Li, Zhang, Wu, & Di, 2007), the term \frac{k_{u}}{2m} indicates the probability of node u making connections with other nodes in the network, if connections between nodes were random. Gomez, Jensen, and Arenas (2009) discuss how, when networks are signed, the positive and negative edges cancel each other out and the term \frac{k_{u}}{2m} loses its probabilistic meaning. To deal with this limitation, Gomez, Jensen, and Arenas (2009) proposed modularity Q for signed weighted networks, generalised to fuzzy modularity Q for signed weighted networks:

Q=(\frac{2w^{+}}{2w^{+}+2w^{-}})(\frac{1}{2m^{+}}) ∑_{cε_C} ∑_{u,vε_V} α_{cu}^{+} α_{cv}^{+} (A_{uv}^{+}-\frac{k_{u}^{+}k_{v}^{+}}{2m})- (\frac{2w^{-}}{2w^{+}+2w^{-}})(\frac{1}{2m^{-}}) ∑_{cε_C} ∑_{u,vε_V} α_{cu}^{-} α_{cv}^{-} (A_{uv}^{-}-\frac{k_{u}^{-}k_{v}^{-}}{2m})

where the sign + indicates positive edge weights and the sign - indicates negative edge weights, respectively.

Value

A numeric scalar, the fuzzy modularity score for signed weighted networks of the given configuration.

Author(s)

Pedro Henrique Ribeiro Santiago, phrs16@gmail.com [ctb]

Gustavo Hermes Soares, [rev]

Adrian Quintero, [rev]

Lisa Jamieson, [rev]

References

Gomez, S., Jensen, P., & Arenas, A. (2009). Analysis of community structure in networks of correlated data. Physical review E, 80(1), 016114.

See Also

FuzzyMod

Examples

`%du%` <- igraph::`%du%` 
g <- igraph::make_full_graph(6) %du% igraph::make_full_graph(6)
g <- igraph::add_edges(g, c(1,7, 2,8))
edges <- rep(1,32)
edges[31] <- -1
igraph::E(g)$weight <- edges
plot(g, edge.label=round(igraph::E(g)$weight, 3))
wc <- list(c(1,2,3,4,5,6),c(7,8,9,10,11,12))
SignedFuzzyMod(netinput=g, membassigned=wc)


CliquePercolation documentation built on Nov. 10, 2022, 6:12 p.m.