Skip to content
Snippets Groups Projects
Commit 9a59b4f2 authored by Yassin's avatar Yassin
Browse files

Updating HSS

parent 1e3ace86
No related branches found
No related tags found
No related merge requests found
...@@ -8,9 +8,10 @@ from netbone.filters import boolean_filter, threshold_filter, fraction_filter ...@@ -8,9 +8,10 @@ from netbone.filters import boolean_filter, threshold_filter, fraction_filter
# change distance # change distance
def high_salience_skeleton(data): def high_salience_skeleton(data):
graph = data.copy()
if isinstance(data, pd.DataFrame): if isinstance(data, pd.DataFrame):
graph = nx.from_pandas_edgelist(data) graph = nx.from_pandas_edgelist(data, edge_attr='weight', create_using=nx.Graph())
elif isinstance(data, nx.Graph):
graph = data.copy()
else: else:
print("data should be a panads dataframe or nx graph") print("data should be a panads dataframe or nx graph")
return return
......
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