Community-based measures of node centrality provide an alternative to classic measures of node centrality. "commweight"
weights each community that a node belongs to by how similar that community is to each of the other communities to which the node also belongs. For node i the community centrality is
$$C_{C}(i)=\sum_{i\in j}^{N}\left(1-\frac{1}{m}\sum_{i\in j\cap k}^{m}S(j,k)\right)$$
where the main sum is over the \(N\) communities to which node \(i\) belongs, and \(S(j,k)\) refers to the similarity between community \(j\) and \(k\), calculated as the Jaccard coefficient for the number of shared nodes between each community pair, and this is averaged over the \(m\) communities paired with community \(j\) and in which node \(i\) jointly belongs.
"commconn"
weights each community that a node belongs to by how many connections the community forms outside of itself relative to how many connections the community has within itself (the inverse of modularity), so that nodes that belong to more highly connecting communitites will receive a higher community centrality score. For node i the community centrality is
$$C_{C}(i)=\sum_{i\in j}^{N}e_{ij}\frac{\check{e}_{B(j)}}{\check{e}_{W(j)}}$$
where \(e_{ij}\) is the number of edges node i has in community j, \(\check{e}_{B(j)}=\frac{e_{B(j)}}{n_{j}\bar{d}}\) is the number of edges community j makes outside of itself normalised by the number of nodes in community j multiplied by the average degree in the network, and \(\check{e}_{W(j)}=\frac{e_{W(j)}}{n(n-1)/2}\) is the number of edges within community j normalised by the total number possible.