Commit a3f63afd authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Update absinth.py

parent 44d5d96b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -481,8 +481,9 @@ def root_hubs(graph: nx.Graph, edge_freq_dict: dict) -> list:
            explained above.
    """
    
    if config.min_neighbors == 'log':
    mean_degree = np.mean(list(dict(graph.degree).values()))
    
    if config.min_neighbors == 'log' and mean_degree > 0:
        min_neighbors = int(np.log(mean_degree) * mean_degree)
    else:
        min_neighbors = config.min_neighbors