Skip to content

Commit

Permalink
📝 documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRossetti committed Sep 3, 2023
1 parent d081b2e commit d5ac19d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cdlib/algorithms/bipartite_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def bimlpa(g_original: object, theta: float = 0.3, lambd: int = 7) -> BiNodeClus
"""
BiMLPA is designed to detect the many-to-many correspondence community in bipartite networks using multi-label propagation algorithm.
This method works for the connected graph. If the graph is not connected, the method will be applied to each connected component of the graph and the results will be merged.
**Supported Graph Types**
Expand Down Expand Up @@ -123,7 +124,7 @@ def CPM_Bipartite(
>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.algorithms.bipartite.generators.random_graph(100, 20, 0.5)
>>> coms = algorithms.CPM_Bipartite(G, 1)
>>> coms = algorithms.CPM_Bipartite(G, 0.5)
:References:
Expand Down Expand Up @@ -201,7 +202,7 @@ def infomap_bipartite(g_original: object, flags: str = "") -> BiNodeClustering:
>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.karate_club_graph()
>>> G = nx.algorithms.bipartite.generators.random_graph(100, 20, 0.5)
>>> coms = algorithms.infomap_bipartite(G)
:References:
Expand Down
2 changes: 1 addition & 1 deletion cdlib/test/test_community_discovery_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def test_CPM_Bipartite(self):

if leidenalg is None:
return
coms = algorithms.CPM_Bipartite(g, 0.3)
coms = algorithms.CPM_Bipartite(g, 0.5)
self.assertEqual(type(coms.communities), list)
if len(coms.communities) > 0:
self.assertEqual(type(coms.communities[0]), list)
Expand Down

0 comments on commit d5ac19d

Please sign in to comment.