From 89c1252d6c673d6f977bcdb91abdb44d5b78faee Mon Sep 17 00:00:00 2001 From: John Lees Date: Wed, 27 Jan 2021 12:03:43 +0000 Subject: [PATCH] Fix weighted mean betweenness --- CMakeLists.txt | 2 +- PopPUNK/network.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f590764d..88ddd57e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ set_target_properties("${TARGET_NAME}" PROPERTIES ) target_link_libraries("${TARGET_NAME}" PRIVATE pybind11::module Eigen3::Eigen - z gomp openblas lapack gfortran m dl) + z gomp openblas gfortran m dl) #if(OpenMP_CXX_FOUND) # target_link_libraries("${TARGET_NAME}" PRIVATE OpenMP::OpenMP_CXX) #endif() diff --git a/PopPUNK/network.py b/PopPUNK/network.py index 6176ca0f..86c88eb5 100644 --- a/PopPUNK/network.py +++ b/PopPUNK/network.py @@ -392,7 +392,7 @@ def networkSummary(G, calc_betweenness=True): if len(betweenness) > 1: mean_bt = np.mean(betweenness) - np.average(betweenness, weights=sizes) + weighted_mean_bt = np.average(betweenness, weights=sizes) metrics = [components, density, transitivity, mean_bt, weighted_mean_bt] base_score = transitivity * (1 - density)