Commit 0350daae authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Bugfixes.

parent 00e5bf3c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1025,12 +1025,12 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None:

        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
        
        except ZeroDivisionError:
            mean_degree = 0
            stat_dict['L_rand'] = None
            stat_dict['C_rand'] = 0
        
        propagation_rank = config.colour_rank
        mst_rank = config.mst_rank
+4 −3
Original line number Diff line number Diff line
@@ -637,11 +637,12 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None:

        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
        except ZeroDivisionError:
            mean_degree = 0
            stat_dict['L_rand'] = None
            stat_dict['C_rand'] = 0

        print('[a]', 'Disambiguating results.\t('+topic_name+')')