communities
communities copied to clipboard
Library of community detection algorithms and visualization tools
你自已给的样例图都画不出来你怎么好意思放的啊?傻狗
I tried all the example with this matrix adj_matrix = np.array([[0, 1, 1, 0, 0, 0], [1, 0, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [0, 0,...
Here is the modularity I know.  And here is your code: ```python def modularity_matrix(adj_matrix : np.ndarray) -> np.ndarray: k_i = np.expand_dims(adj_matrix.sum(axis=1), axis=1) k_j = k_i.T norm = 1 /...
Compared with Louvain and GN, the modularity value obtained by spectral clustering algorithm is too low, with a difference of one order of magnitude
想请问如果不考虑画图 只考虑计算部分 这个库有问题嘛…如果计算也有问题求可用项目指路^ ^谢谢 _Originally posted by @nameless0704 in https://github.com/shobrook/communities/issues/6#issuecomment-1228207810_
1. Package networkx has no attirbute "from_numpy_matrix". I use the new method "from_numpy_array" to construct the network instead. This works well. 2. PathCollection object has no attirbute "set_offset_position". I use...
I posted a previous bug: https://github.com/shobrook/communities/issues/14 Once one makes my suggested change, you hit another error: ``` File ~/miniconda3/lib/python3.10/site-packages/communities/visualization/draw_communities.py:161, in draw_community_patches(nodes, communities, axes) 160 def draw_community_patches(nodes, communities, axes): --> 161...
The given example: ``` communities, frames = louvain_method(adj_matrix=adj_matrix) ax = draw_communities(adj_matrix, communities) ``` throws an error: `AttributeError: module 'networkx' has no attribute 'from_numpy_matrix'`. According to https://stackoverflow.com/a/75284568, it seems like this...
G = nx.from_numpy_matrix(adj_matrix) gives error AttributeError: module 'networkx' has no attribute 'from_numpy_matrix'
https://networkx.org/documentation/stable/reference/generated/networkx.convert_matrix.from_numpy_array.html