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

Update absinth.py

parent 4d0f8a87
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -479,7 +479,12 @@ 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()))
        min_neighbors = np.log(mean_degree) * mean_degree
    else:
        min_neighbors = config.min_neighbors
    
    threshold = config.threshold
    
    # Allow operations on graph without altering original one.