diff --git a/cdlib/algorithms/biparitte_clustering.py b/cdlib/algorithms/biparitte_clustering.py index c796b383..c18728b5 100644 --- a/cdlib/algorithms/biparitte_clustering.py +++ b/cdlib/algorithms/biparitte_clustering.py @@ -1,4 +1,3 @@ -from BiMLPA import BiMLPA_SqrtDeg, relabeling, output_community from cdlib import BiNodeClustering import networkx as nx @@ -31,6 +30,8 @@ def bimlpa(g, theta=0.3, lambd=7): .. note:: Reference implementation: https://github.com/hbkt/BiMLPA """ + from BiMLPA import BiMLPA_SqrtDeg, relabeling, output_community + g = convert_graph_formats(g, nx.Graph) bimlpa = BiMLPA_SqrtDeg(g, theta, lambd) diff --git a/cdlib/algorithms/overlapping_partition.py b/cdlib/algorithms/overlapping_partition.py index 76c46a7d..26faecaf 100644 --- a/cdlib/algorithms/overlapping_partition.py +++ b/cdlib/algorithms/overlapping_partition.py @@ -113,7 +113,7 @@ def angel(g, threshold, min_community_size=3): :References: - 1. Rossetti G. **Angel: efficient, and effective, node-centric community discovery in static and dynamic networks.** + 1. Rossetti, Giulio. "Exorcising the Demon: Angel, Efficient Node-Centric Community Discovery." International Conference on Complex Networks and Their Applications. Springer, Cham, 2019. .. note:: Reference implementation: https://github.com/GiulioRossetti/ANGEL """ diff --git a/cdlib/evaluation/fitness.py b/cdlib/evaluation/fitness.py index 74a85ccb..1f051635 100644 --- a/cdlib/evaluation/fitness.py +++ b/cdlib/evaluation/fitness.py @@ -832,7 +832,8 @@ def purity(communities): :References: - 1. ###### + 1. Citraro, Salvatore, and Giulio Rossetti. "Eva: Attribute-Aware Network Segmentation." International Conference on Complex Networks and Their Applications. Springer, Cham, 2019. """ + pur = Eva.purity(communities.coms_labels) return FitnessResult(score=pur) diff --git a/docs/bibliography.rst b/docs/bibliography.rst index f34efd19..2473ce7b 100644 --- a/docs/bibliography.rst +++ b/docs/bibliography.rst @@ -74,8 +74,7 @@ Reference evaluation: - Erdos_renyi_modularity: Erdos, P., & Renyi, A. (1959). `On random graphs I. `_ Publ. Math. Debrecen, 6, 290-297. - Modularity_density: Li, Z., Zhang, S., Wang, R. S., Zhang, X. S., & Chen, L. (2008). `Quantitative function for algorithms detection. `_ Physical review E, 77(3), 036109. - Z_modularity: Miyauchi, Atsushi, and Yasushi Kawase. `Z-score-based modularity for algorithms detection in networks. `_ PloS one 11.1 (2016): e0147805. - - Surprise: Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). `Detecting communities using asymptotical surprise. `_ Physical Review E, 92(2), 022816. - - Significance: Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). `Detecting communities using asymptotical surprise. `_ Physical Review E, 92(2), 022816. + - Surprise & Significance: Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). `Detecting communities using asymptotical surprise .. `_ Physical Review E, 92(2), 022816. - average_internal_degree: Radicchi, F., Castellano, C., Cecconi, F., Loreto, V., & Parisi, D. (2004). `Defining and identifying communities in networks. `_ Proceedings of the National Academy of Sciences, 101(9), 2658-2663. - conductance: Shi, J., Malik, J.: `Normalized cuts and image segmentation. `_ Departmental Papers (CIS), 107 (2000) - cut_ratio: Fortunato, S.: `Community detection in graphs. `_ Physics reports 486(3-5), 75–174 (2010) diff --git a/docs/conf.py b/docs/conf.py index 1a056d25..6d68b4db 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,10 +24,9 @@ def __getattr__(cls, name): return MagicMock() -MOCK_MODULES = ['ipaddress', 'graph-tool', 'leidenalg', 'numpy', 'scipy', 'networkx', 'sklearn', 'pquality', 'functools', 'nf1', +MOCK_MODULES = ['ipaddress', 'graph-tool', 'leidenalg', 'numpy', 'scipy', 'networkx', 'karateclub', 'bimlpa', 'sklearn', 'pquality', 'functools', 'nf1', 'ipython', 'pygtk', 'gtk', 'gobject', 'argparse', 'matplotlib', 'matplotlib.pyplot', 'scikit-learn', - 'python-igraph', 'wurlitzer', 'pulp','seaborn','pandas', 'infomap', 'angel-cd', 'omega_index_py3', 'karateclub', - 'bimlpa'] + 'python-igraph', 'wurlitzer', 'pulp', 'seaborn', 'pandas', 'infomap', 'angel-cd', 'omega_index_py3'] #, 'karateclub', 'bimlpa'] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) html_theme = "sphinx_rtd_theme" @@ -253,8 +252,7 @@ def __getattr__(cls, name): # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'CDlib.tex', u'CDlib Documentation', - u'Giulio Rossetti', 'manual'), + (master_doc, 'CDlib.tex', u'CDlib Documentation', u'Giulio Rossetti', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/docs/reference/classes/node_clustering.rst b/docs/reference/classes/node_clustering.rst index a495e7ae..d7571e85 100644 --- a/docs/reference/classes/node_clustering.rst +++ b/docs/reference/classes/node_clustering.rst @@ -56,7 +56,8 @@ Comparing Node Clusterings .. autosummary:: NodeClustering.normalized_mutual_information - NodeClustering.overlapping_normalized_mutual_information + NodeClustering.overlapping_normalized_mutual_information_MGH + NodeClustering.overlapping_normalized_mutual_information_LFK NodeClustering.omega NodeClustering.f1 NodeClustering.nf1