Loading src/absinth.py +4 −0 Original line number Diff line number Diff line Loading @@ -1022,7 +1022,11 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None: edge_count = len(graph.edges) node_count = len(graph.nodes) try: mean_degree = edge_count/node_count except ZeroDivisionError: mean_degree = 0 stat_dict['L_rand'] = np.log(node_count)/np.log(mean_degree) stat_dict['C_rand'] = 2 * mean_degree/node_count Loading src/abstinent.py +5 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): edge_freq_dict = {(key1,key2):value2 for key1,value1 in edge_freq_dict.items() for key2,value2 in value1.items()} print('[a] Collected frequencies from hidden hideout.') print('[a] Collected frequencies from secret hideout.') continue Loading Loading @@ -634,7 +634,11 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None: edge_count = len(graph.edges) node_count = len(graph.nodes) try: mean_degree = edge_count/node_count except ZeroDivisionError: mean_degree = 0 stat_dict['L_rand'] = np.log(node_count)/np.log(mean_degree) stat_dict['C_rand'] = 2 * mean_degree/node_count Loading Loading
src/absinth.py +4 −0 Original line number Diff line number Diff line Loading @@ -1022,7 +1022,11 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None: edge_count = len(graph.edges) node_count = len(graph.nodes) try: mean_degree = edge_count/node_count except ZeroDivisionError: mean_degree = 0 stat_dict['L_rand'] = np.log(node_count)/np.log(mean_degree) stat_dict['C_rand'] = 2 * mean_degree/node_count Loading
src/abstinent.py +5 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): edge_freq_dict = {(key1,key2):value2 for key1,value1 in edge_freq_dict.items() for key2,value2 in value1.items()} print('[a] Collected frequencies from hidden hideout.') print('[a] Collected frequencies from secret hideout.') continue Loading Loading @@ -634,7 +634,11 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None: edge_count = len(graph.edges) node_count = len(graph.nodes) try: mean_degree = edge_count/node_count except ZeroDivisionError: mean_degree = 0 stat_dict['L_rand'] = np.log(node_count)/np.log(mean_degree) stat_dict['C_rand'] = 2 * mean_degree/node_count Loading