Skip to content
Snippets Groups Projects
Commit 1fbefb1a authored by Ali Yassin's avatar Ali Yassin
Browse files

Deleted netbone/Utils/__init__.py, netbone/Utils/narrate.py, netbone/Utils/utils.py

parent 9a59b4f2
No related branches found
No related tags found
No related merge requests found
import numpy as np
import pandas as pd
import networkx as nx
def lcc(G):
return G.subgraph(max(nx.connected_components(G), key=len)).copy()
def cumulative_dist(name, method, values, increasing=True):
if increasing:
x = -np.sort(-np.array(values))
else:
x = np.sort(values)
y = np.arange(1, len(x) + 1)/len(x)
df = pd.DataFrame(index=x)
df.index.name = name
df[method] = y
return df
def edge_properties(df):
columns = list(df.columns)
columns.remove('source')
columns.remove('target')
return columns
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment