From f16596a5fa26c2e999d041b59950a56c0b8fcf8f Mon Sep 17 00:00:00 2001
From: Yassin <aliyassin4@hotmail.com>
Date: Wed, 10 May 2023 02:26:05 +0200
Subject: [PATCH] Refactorings Code and Adding Node Filter

---
 netbone/structural/high_salience_skeleton.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/netbone/structural/high_salience_skeleton.py b/netbone/structural/high_salience_skeleton.py
index 80b2da8..ffec1cc 100644
--- a/netbone/structural/high_salience_skeleton.py
+++ b/netbone/structural/high_salience_skeleton.py
@@ -17,7 +17,7 @@ def high_salience_skeleton(data):
     values = {pair: 1 / wes[pair] for pair in wes}
     nx.set_edge_attributes(graph, values, name='distance')
 
-    nx.set_edge_attributes(graph, 0, name='score')
+    nx.set_edge_attributes(graph, 0, name='salience')
 
     for source in graph.nodes():
         tree = nx.single_source_dijkstra(graph, source, cutoff=None, weight='distance')[1]
@@ -29,9 +29,9 @@ def high_salience_skeleton(data):
                 node_tree_scores[(path[i], path[i + 1])] = 1
 
         for u, v in node_tree_scores:
-            graph[u][v]['score'] += 1
+            graph[u][v]['salience'] += 1
 
-    scores = nx.get_edge_attributes(graph, 'score')
+    scores = nx.get_edge_attributes(graph, 'salience')
     N = len(graph)
     score_values = dict()
     backbone_edges = dict()
-- 
GitLab