Skip to content

Commit

Permalink
Merge pull request #89 from GiulioRossetti/karate_club_integration
Browse files Browse the repository at this point in the history
📝 documentation
  • Loading branch information
GiulioRossetti authored Jan 30, 2020
2 parents a8ba1d4 + 36a5177 commit 1a155bc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion cdlib/algorithms/biparitte_clustering.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from BiMLPA import BiMLPA_SqrtDeg, relabeling, output_community
from cdlib import BiNodeClustering

import networkx as nx
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cdlib/algorithms/overlapping_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
3 changes: 2 additions & 1 deletion cdlib/evaluation/fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 1 addition & 2 deletions docs/bibliography.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ Reference evaluation:
- Erdos_renyi_modularity: Erdos, P., & Renyi, A. (1959). `On random graphs I. <https://gnunet.org/sites/default/files/Erd%C5%91s%20%26%20R%C3%A9nyi%20-%20On%20Random%20Graphs.pdf/>`_ 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. <https://www.sciencedirect.com/science/article/pii/S0020025516305059/>`_ Physical review E, 77(3), 036109.
- Z_modularity: Miyauchi, Atsushi, and Yasushi Kawase. `Z-score-based modularity for algorithms detection in networks. <https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0147805/>`_ PloS one 11.1 (2016): e0147805.
- Surprise: Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). `Detecting communities using asymptotical surprise. <https://link.aps.org/doi/10.1103/PhysRevE.92.022816/>`_ Physical Review E, 92(2), 022816.
- Significance: Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). `Detecting communities using asymptotical surprise. <https://link.aps.org/doi/10.1103/PhysRevE.92.022816/>`_ Physical Review E, 92(2), 022816.
- Surprise & Significance: Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). `Detecting communities using asymptotical surprise .. <https://link.aps.org/doi/10.1103/PhysRevE.92.022816/>`_ 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. <https://www.pnas.org/content/101/9/2658.short/>`_ Proceedings of the National Academy of Sciences, 101(9), 2658-2663.
- conductance: Shi, J., Malik, J.: `Normalized cuts and image segmentation. <https://repository.upenn.edu/cgi/viewcontent.cgi?article=1101&context=cis_papers/>`_ Departmental Papers (CIS), 107 (2000)
- cut_ratio: Fortunato, S.: `Community detection in graphs. <https://www.sciencedirect.com/science/article/pii/S0370157309002841/>`_ Physics reports 486(3-5), 75–174 (2010)
Expand Down
8 changes: 3 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/classes/node_clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a155bc

Please sign in to comment.