# Community Detection Method Based on Node Density, Degree Centrality, and K-Means Clustering in Complex Network

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Theory

#### 2.1. Uncertainty

_{j}, the CB uncertainty of ${v}_{i}$ in ${c}_{j}$ is considered to be high. The parameter m refers to the number of communities in the network, and the CB uncertainty of the node refers to a quantified parameter if the node does not belong to a specific community. The CB uncertainty of a node in a specific community is defined as a random variable $C\left({c}_{1},{c}_{2},{c}_{3},\dots ,{c}_{m}\right)$, and the probability of the $i$-th node in the $q$-th community is defined as $p\left({c}_{q}\right)$, where $q=1,2,\dots ,m$. Then, the CB uncertainty of ${v}_{i}$ is defined as:

_{1}, c

_{2}, and c

_{3}and all nodes in the subgraph were $p({c}_{1})=1,\text{}p({c}_{2})=0,\mathrm{and}\text{}p({c}_{3})=0$, respectively. The uncertainty of node 2 at h = 2 was calculated by Equation (1):

#### 2.2. Community Belongingness

#### 2.3. Similarity

_{j}, $N\left({v}_{i}\right)\text{}\mathrm{and}\text{}N\left({v}_{j}\right)$ ${v}_{i}$, $\left|N\left({v}_{i}\right)\cap N\left({v}_{j}\right)\right|$ refers to the quantity of common adjacent nodes shared by ${v}_{i}$. and v

_{j}, and $\left|N\left({v}_{i}\right)\cup N\left({v}_{j}\right)\right|$ refers to the quantity of nodes in the union of common adjacent node sets of ${v}_{i}$ and ${v}_{j}$.

#### 2.4. Balance

## 3. Method

#### 3.1. DDJKM Algorithm

#### 3.2. K-Means Community Detection Clustering Algorithm

#### 3.3. Complexity Analysis

## 4. Experimental

#### 4.1. Evaluation Measures

#### 4.2. Testing Networks

#### 4.2.1. Real-World Networks

#### 4.2.2. Computer-Generated Network

#### 4.3. Experimental Results and Analysis

#### 4.3.1. Experiments on Real-World Networks

#### 4.3.2. Experiments on LFR Benchmark Networks

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Watts, D.J. A twenty-first century science. Nature
**2007**, 445, 489. [Google Scholar] [CrossRef] - Wang, F.Y.; Zeng, D.; Carley, K.M.; Mao, W. Social computing: From social informatics to social intelligence. IEEE Intell. Syst.
**2007**, 22, 79–83. [Google Scholar] [CrossRef] - Wang, Y.W.; Wang, H.O.; Xiao, J.W.; Guan, Z.H. Synchronization of complex dynamical networks under recoverable attacks. Automatica
**2010**, 46, 197–203. [Google Scholar] [CrossRef] - Papadopoulos, S.; Kompatsiaris, Y. Community detection in social media performance and application considerations. Data Min. Knowl. Disc.
**2012**, 24, 515–554. [Google Scholar] [CrossRef] - Tong, S.C.; Li, Y.M.; Zhang, H.G. Adaptive neural network decentralized backstepping output-feedback control for nonlinear large-scale systems with time delays. IEEE Trans. Neural Netw.
**2011**, 22, 1073–1086. [Google Scholar] [CrossRef] - Liu, Y.; Moser, J.; Aviyente, S. Network community structure detection for directional neural networks inferred from multichannel multisubject EEG data. IEEE Trans. Biomed. Eng.
**2014**, 61, 1919–1930. [Google Scholar] [CrossRef] - Perianes-Rodríguez, A.; Olmeda-Gómez, C.; Moya-Anegón, F. Detecting, identifying and visualizing research groups in co-authorship networks. Scientometrics
**2010**, 82, 307–319. [Google Scholar] [CrossRef] - Fortunato, S. Community detection in graphs. Phys. Rep.
**2010**, 486, 75–174. [Google Scholar] [CrossRef] - Liu, C.; Du, Y.; Lei, J. A SOM-Based Membrane Optimization Algorithm for Community Detection. Entropy
**2019**, 21, 533. [Google Scholar] [CrossRef] - Blondel, V.D.; Guillaume, J.-L.; Lambiotte, R.; Lefebvre, E. Fast unfolding of communities in large networks. J. Stat. Mech.
**2008**, 2008, P10008. [Google Scholar] [CrossRef] - Barber, M.J.; Clark, J.W. Detecting network communities by propagating labels under constraints. Phys. Rev. E
**2009**, 80, 026129. [Google Scholar] [CrossRef] [PubMed] - Raghavan, U.N.; Albert, R.; Kumara, S. Near linear time algorithm to detect community structures in large-scale networks. Phys. Rev. E
**2007**, 76, 036106. [Google Scholar] [CrossRef] [PubMed] - Šubelj, L.; Bajec, M. Ubiquitousness of link-density and link-pattern communities in real-world networks. Eur. Phys. J. B
**2012**, 85, 1–11. [Google Scholar] [CrossRef] - Jin, H.; Wang, S.; Li, C. Community detection in complex networks by density-based clustering. Phys. A
**2013**, 392, 4606–4618. [Google Scholar] [CrossRef] - Gong, M.; Liu, J. Novel heuristic density-based method for community detection in networks. Phys. A
**2014**, 403, 71–84. [Google Scholar] [CrossRef] - Zhou, H. Distance, dissimilarity index, and network community structure. Phys. Rev. E
**2003**, 67, 061901. [Google Scholar] [CrossRef] - Rosvall, M.; Bergstrom, C.T. Maps of random walks on complex networks reveal community structure. Proc. Natl. Acad. Sci. USA
**2008**, 105, 1118–1123. [Google Scholar] [CrossRef] - MacQueen, J. Some Methods for Classification and Analysis of Multivariate Observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, Berkeley, CA, USA, 21–27 July 1965, 27 December–7 January 1965; Le Cam, L.M., Neyman, J., Eds.; University of California Press: Berkeley, CA, USA, 1967; Volume 1, pp. 281–297. [Google Scholar]
- Jiang, Y.; Jia, C.; Yu, J. An efficient community detection method based on rank centrality. Phys. A
**2013**, 392, 2182–2194. [Google Scholar] [CrossRef] - Li, Y.; Jia, C. A parameter-free community detection method based on centrality and dispersion of nodes in complex networks. Phys. A
**2015**, 438, 321–334. [Google Scholar] [CrossRef] - Wang, T.; Wang, H. A novel cosine distance for detecting communities in complex networks. Phys. A
**2015**, 437, 21–35. [Google Scholar] [CrossRef] - Popat, S.K.; Emmanuel, M. Review and comparative study of clustering techniques. Int. J. Comput. Sci. Inf. Technol.
**2014**, 5, 805–812. [Google Scholar] - Celebi, M.E.; Kingravi, H.A.; Vela, P.A. A comparative study of efficient initialization methods for the k-means clustering al-gorithm. Expert Syst. Appl.
**2013**, 40, 200–210. [Google Scholar] [CrossRef] - Girvan, M.; Newman, M.E. Community structure in social and biological networks. Proc. Natl. Acad. Sci. USA
**2002**, 99, 7821–7826. [Google Scholar] [CrossRef] [PubMed] - Bilal, S.; Abdelouahab, M. Node similarity and modularity for finding communities in networks. Phys. A Stat. Mech. Its Appl.
**2018**, 492, 1958–1966. [Google Scholar] - Lü, L.; Zhou, T. Link prediction in complex networks: A survey. Phys. A
**2011**, 390, 1150–1170. [Google Scholar] [CrossRef] - Salton, G.; Mcgill, M.J. Introduction to Modern Information Retrieval; McGraw–Hill: New York, NY, USA, 1983. [Google Scholar]
- Jaccard, P. Étude comparative de la distribution florale dans une portion des alpes et des jura. Bulletin De La Societe Vaudoise des Science Naturelles
**1901**, 37, 547. [Google Scholar] - Srensen, T. A method of establishing groups of equal amplitude in plant sociology based on similarity of species content and its application to analyses of the vegetation on danish commons. Videnski Selsk Biol. Skr.
**1948**, 5, 1–34. [Google Scholar] - Ravasz, E.; Somera, A.L.; Mongru, D.A.; Oltvai, Z.N.; Barabasi, A.L. Hierarchical organization of modularity in metabolic networks. Science
**2002**, 297, 1551–1555. [Google Scholar] [CrossRef] - Barabasi, A.L.; Albert, R. Emergence of scaling in random networks. Science
**1999**, 286, 509–512. [Google Scholar] [CrossRef] - Adamic, L.; Adar, E. Friends and neighbors on the web. Soc. Netw.
**2003**, 25, 211–230. [Google Scholar] [CrossRef] - Zhou, T.; Lü, L.; Zhang, Y.C. Predicting missing links via local information. Eur. Phys. J. B.
**2009**, 71, 623. [Google Scholar] [CrossRef] - Pons, P.; Latapy, M. Computing Communities in Large Networks Using Random Walks. J. Graph Algorithms Appl.
**2006**, 10, 191–218. [Google Scholar] [CrossRef] - De Meo, P.; Ferrara, E.; Fiumara, G.; Provetti, A. Mixing local and global information for community detection in large networks. J. Comput. Syst. Sci.
**2014**, 80, 72–87. [Google Scholar] [CrossRef] - Okuda, M.; Satoh, S.; Iwasawa, S.; Yoshida, S.; Kidawara, Y.; Sato, Y. Community detection using random-walk similarity and application to image clustering. ICIP
**2017**, 1292–1296. [Google Scholar] - Bao, Z.K.; Ma, C.; Xiang, B.B.; Zhang, H.F. Identification of influential nodes in complex networks: Method from spreading probability viewpoint. Phys. A Stat. Mech. Its Appl.
**2017**, 468, 391–397. [Google Scholar] [CrossRef] - Cai, B.; Tuo, X.G.; Yang, K.X.; Liu, M.Z. Community centrality for node’s influential ranking in complex network. Int. J. Mod. Phys. C
**2014**, 25, 1350096. [Google Scholar] [CrossRef] - Newman, M.E.; Reinert, G. Estimating the Number of Communities in a Network. Phys. Rev.Lett.
**2016**, 117. [Google Scholar] [CrossRef][Green Version] - Zachary, W.W. An information flow model for conflict and fission in small groups. J. Anthropol. Res.
**1977**, 33, 452–473. [Google Scholar] [CrossRef][Green Version] - Lusseau, D.; Schneider, K.; Boisseau, O.J.; Haase, P.; Slooten, E.; Dawson, S.M. The bottlenose dolphin community of Doubtful Sound features a large proportion of long-lasting associations. Behav. Ecol. Sociobiol.
**2003**, 54, 396–405. [Google Scholar] [CrossRef] - Newman, M. Mark Newman’s Network Data Collection. Available online: http://www-personal.umich.edu/~mejn/netdata (accessed on 25 August 2019).
- Newman, M. Modularity and community structure in networks. APS March Meeting. Am. Phys. Soc.
**2006**, 103, 8577–8582. [Google Scholar] - Jiang, J.Q.; McQuay, L.J. Modularity functions maximization with nonnegative relaxation facilitates community detection in networks. Phys. A
**2012**, 391, 854–865. [Google Scholar] [CrossRef][Green Version] - Leskovec, J.; Krevl, A. SNAP Datasets: Stanford Large Network Dataset Collection. Available online: http://snap.stanford.edu/data (accessed on 25 August 2019).
- Gong, M.G.; Fu, B.; Jiao, L.C.; Du, H.F. Memetic algorithm for community detection in networks. Phys. Rev. E
**2011**, 006100. [Google Scholar] [CrossRef] [PubMed][Green Version] - Danon, L.; Díaz-Guilera, A.; Duch, J.; Arenas, A. Comparing community structure identification. J. Stat. Mech. Theory Exp.
**2005**, P09008. [Google Scholar] [CrossRef] - Hu, Y.; Yang, B. Characterizing the structure of large real networks to improve community detection. Neural Comput. Appl.
**2017**, 28, 2321–2333. [Google Scholar] [CrossRef] - Lancichinetti, A.; Fortunato, S.; Radicchi, F. Benchmark graphs for testing community detection algorithms. Phys. Rev. E
**2008**, 78, 046110. [Google Scholar] [CrossRef][Green Version] - Clauset, A.; Newman, M.E.J.; Moore, C. Finding community structure in very large networks. Phys. Rev. E
**2010**, 70, 264–277. [Google Scholar] [CrossRef][Green Version] - Mahmood, A.; Small, M. Subspace based network community detection using sparse linear coding. IEEE Trans. Knowl. Data Eng.
**2016**, 28, 801–812. [Google Scholar] [CrossRef] - Shang, R.; Bai, J.; Jiao, L.; Jin, C. Community detection based on modularity and an improved genetic;algorithm. Phys. Stat. Mech. Its Appl.
**2013**, 392, 1215–1231. [Google Scholar] [CrossRef] - Tian, B.; Li, W. Community Detection Method Based on Mixed-norm Sparse Subspace Clustering. Neurocomputing
**2018**, 275, 2150–2161. [Google Scholar] [CrossRef] - Tasgin, M.; Bingol, H.O. Community detection using preference networks. Phys. Stat. Mech. Its Appl.
**2017**, 495, 126–136. [Google Scholar] [CrossRef][Green Version] - Fortunato, S.; Barthélemy, M. Resolution limit in community detection. Proc. Natl. Acad. Sci. USA
**2007**, 104, 36–41. [Google Scholar] [CrossRef] [PubMed][Green Version]

**Figure 7.**The community structure of the Zachary’s karate club network as detected by the proposed method.

**Figure 9.**The community structure of the Books about US politics network as detected by the proposed method.

**Figure 10.**The community structure of the American college football network as detected by the proposed method (12 communities).

**Figure 11.**The community structure of the American college football network as detected by the proposed method (11 communities).

**Table 1.**CB uncertainty of each node in the two-hop subgraph on the sample network shown in Figure 2.

Node | Density |
---|---|

2, 6, 12 | 0.667 |

1, 3, 7, 9, 11, 13 | 0.5 |

4, 8, 10 | 0.333 |

5 | 0.2 |

Network | $\mathit{N}$ | ${\mathit{\tau}}_{1}$ | ${\mathit{\tau}}_{2}$ | ${\mathit{C}}_{\mathit{m}\mathit{i}\mathit{n}}$ | ${\mathit{C}}_{\mathit{m}\mathit{a}\mathit{x}}$ | $\langle \mathit{k}\rangle $ | ${\mathit{k}}_{\mathit{m}\mathit{a}\mathit{x}}$ | $\mathit{\mu}$ |
---|---|---|---|---|---|---|---|---|

LFR1 | 1000 | 2 | 1 | 20 | 50 | 20 | 50 | 0.1-0.9 |

LFR2 | 2000 | 2 | 1 | 20 | 100 | 20 | 50 | 0.1-0.9 |

LFR3 | 5000 | 2 | 1 | 20 | 50 | 20 | 50 | 0.1-0.9 |

LFR4 | 5000 | 2 | 1 | 20 | 100 | 15 | 75 | 0.1-1.0 |

**Table 3.**Experimental results ($\text{}F$, $NMI$) of the community detection algorithm. The best results are marked in bold.

Network | GN | FG | MIGA | SLC | Equation (20) | k-means | DDJKM | ||
---|---|---|---|---|---|---|---|---|---|

Karate | $\left|c\right|$ | 2 | 2 | 2 | 2 | 2 | 2 | 2 | |

$F1$ | 0.970 | 0.971 | 1 | 0.971 | 1 | 0.879 | 1 | ||

$NMI$ | 0.836 | 0.837 | 1 | 0.837 | 1 | 0.666 | 1 | ||

Dolphins | $\left|c\right|$ | 2 | 2 | 2 | 2 | 2 | 2 | 2 | |

$F1$ | 0.980 | 0.937 | 0.965 | 0.980 | 0.961 | 0.770 | 0.982 | ||

$NMI$ | 0.890 | 0.652 | 0.814 | 0.890 | 0.814 | 0.417 | 0.889 | ||

Polbooks | $\left|c\right|$ | 3 | 3 | 3 | 3 | 3 | 3 | 2 | 3 |

$F1$ | 0.808 | 0.725 | 0.797 | 0.798 | 0.829 | 0.655 | 0.784 | 0.726 | |

$NMI$ | 0.568 | 0.568 | 0.585 | 0.584 | 0.597 | 0.454 | 0.571 | 0.530 | |

Football | $\left|c\right|$ | 12 | 12 | 12 | 12 | 12 | 12 | 11 | 12 |

$F1$ | 0.802 | 0.528 | 0.864 | 0.846 | 0.859 | 0.730 | 0.920 | 0.885 | |

$NMI$ | 0.878 | 0.697 | 0.916 | 0.793 | 0.865 | 0.822 | 0.933 | 0.923 |

**Table 4.**Experimental results ($F$, $NMI$) of the community detection algorithm. The best results are marked in bold.

Network | WLPA | DDJKM | |
---|---|---|---|

Amazon | $F1$ | 0.582 | 0.554 |

$NMI$ | 0.761 | 0.755 | |

YouTube | $F1$ | 0.273 | 0.482 |

$NMI$ | 0.547 | 0.625 |

$\left|\mathit{V}\right|$ | $\mathit{\mu}$ | $\mathit{N}\mathit{M}\mathit{I}$ | |||||
---|---|---|---|---|---|---|---|

DDJKM | PCN | PSC | LPA | FG | Lvn | ||

5000 | 0.1 | 0.99 | 0.99 | 0.94 | 0.99 | 0.93 | 0.99 |

5000 | 0.2 | 0.99 | 0.99 | 0.92 | 0.99 | 0.78 | 0.98 |

5000 | 0.3 | 0.97 | 0.99 | 0.90 | 0.99 | 0.64 | 0.97 |

5000 | 0.4 | 0.94 | 0.97 | 0.86 | 0.99 | 0.55 | 0.95 |

5000 | 0.5 | 0.87 | 0.93 | 0.80 | 0.98 | 0.46 | 0.93 |

5000 | 0.6 | 0.73 | 0.81 | 0.69 | 0.81 | 0.30 | 0.87 |

5000 | 0.7 | 0.42 | 0.62 | 0.52 | 0.00 | 0.14 | 0.47 |

5000 | 0.8 | 0.25 | 0.40 | 0.33 | 0.00 | 0.06 | 0.10 |

5000 | 0.9 | 0.20 | 0.30 | 0.25 | 0.00 | 0.04 | 0.04 |

5000 | 1.0 | 0.18 | 0.27 | 0.23 | 0.00 | 0.03 | 0.03 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cai, B.; Zeng, L.; Wang, Y.; Li, H.; Hu, Y.
Community Detection Method Based on Node Density, Degree Centrality, and K-Means Clustering in Complex Network. *Entropy* **2019**, *21*, 1145.
https://doi.org/10.3390/e21121145

**AMA Style**

Cai B, Zeng L, Wang Y, Li H, Hu Y.
Community Detection Method Based on Node Density, Degree Centrality, and K-Means Clustering in Complex Network. *Entropy*. 2019; 21(12):1145.
https://doi.org/10.3390/e21121145

**Chicago/Turabian Style**

Cai, Biao, Lina Zeng, Yanpeng Wang, Hongjun Li, and Yanmei Hu.
2019. "Community Detection Method Based on Node Density, Degree Centrality, and K-Means Clustering in Complex Network" *Entropy* 21, no. 12: 1145.
https://doi.org/10.3390/e21121145