GraphRicciCurvature
GraphRicciCurvature copied to clipboard
AttributeError: module 'community' has no attribute 'modularity'
AttributeError Traceback (most recent call last)
in () ----> 1 cc = orc_football.ricci_community() 2 frames /usr/local/lib/python3.7/dist-packages/GraphRicciCurvature/OllivierRicci.py in ricci_community(self, cutoff_step, drop_threshold) 838 """ 839 --> 840 cc = self.ricci_community_all_possible_clusterings(cutoff_step=cutoff_step, drop_threshold=drop_threshold) 841 assert cc, "No clustering found!" 842
/usr/local/lib/python3.7/dist-packages/GraphRicciCurvature/OllivierRicci.py in ricci_community_all_possible_clusterings(self, cutoff_step, drop_threshold) 882 logger.info("Ricci flow detected, start cutting graph into community...") 883 cut_guesses =
--> 884 get_rf_metric_cutoff(self.G, weight=self.weight, cutoff_step=cutoff_step, drop_threshold=drop_threshold) 885 assert cut_guesses, "No cutoff point found!" 886/usr/local/lib/python3.7/dist-packages/GraphRicciCurvature/util.py in get_rf_metric_cutoff(G_origin, weight, cutoff_step, drop_threshold) 96 clustering = {c: idx for idx, comp in enumerate(nx.connected_components(G)) for c in comp} 97 # Compute modularity ---> 98 modularity.append(community_louvain.modularity(clustering, G, weight)) 99 100 good_cuts = []
AttributeError: module 'community' has no attribute 'modularity'
Calling function ricci_community() has some problem (trying to replicate the tutorial notebook). Maybe the solution is simply this? STACK OVERFLOW Attribute error community has no attribute