From 8f4344d8430589a95b92e9119ac6a5bd5d3a655e Mon Sep 17 00:00:00 2001 From: defausti <34766744+defausti@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:15:15 +0100 Subject: [PATCH] Update functions.py --- terra-backend/python-server/modules/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terra-backend/python-server/modules/functions.py b/terra-backend/python-server/modules/functions.py index 1ed187c..f72b0c3 100644 --- a/terra-backend/python-server/modules/functions.py +++ b/terra-backend/python-server/modules/functions.py @@ -66,8 +66,8 @@ def build_metrics(self, graph): }, "closeness": nx.closeness_centrality(graph, distance="inv_weight"), "betweenness": nx.betweenness_centrality(graph, weight="inv_weight"), - "in_degree": graph.in_degree(weight="weight")}, - "distinctiveness": distinctiveness(graph.to_undirected(), alpha = 1, normalize = True, measures = ["D1"])["D1"] + "in_degree": graph.in_degree(weight="weight"), + "distinctiveness": distinctiveness(graph.to_undirected(), alpha = 1, normalize = True, measures = ["D1"])["D1"]} } self.logger.info("[TERRA] Graph metrics ready!")