From ad9d0182c8216f1dfc2cd39776d7774494f48a53 Mon Sep 17 00:00:00 2001 From: Naim Date: Thu, 16 Nov 2023 16:28:42 +0100 Subject: [PATCH] Change expected modularity in python and c test --- cpp/tests/c_api/louvain_test.c | 2 +- python/cugraph/cugraph/tests/community/test_leiden.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/tests/c_api/louvain_test.c b/cpp/tests/c_api/louvain_test.c index e9ac5c9ff06..9221a2ba563 100644 --- a/cpp/tests/c_api/louvain_test.c +++ b/cpp/tests/c_api/louvain_test.c @@ -144,7 +144,7 @@ int test_louvain_no_weight() vertex_t h_src[] = {0, 1, 1, 2, 2, 2, 3, 4, 1, 3, 4, 0, 1, 3, 5, 5}; vertex_t h_dst[] = {1, 3, 4, 0, 1, 3, 5, 5, 0, 1, 1, 2, 2, 2, 3, 4}; vertex_t h_result[] = {1, 1, 1, 2, 0, 0}; - weight_t expected_modularity = 0.0859375; + weight_t expected_modularity = 0.125; // Louvain wants store_transposed = FALSE return generic_louvain_test(h_src, diff --git a/python/cugraph/cugraph/tests/community/test_leiden.py b/python/cugraph/cugraph/tests/community/test_leiden.py index a06b0dd22c5..91305d92780 100644 --- a/python/cugraph/cugraph/tests/community/test_leiden.py +++ b/python/cugraph/cugraph/tests/community/test_leiden.py @@ -44,7 +44,7 @@ "input_type": "COO", "expected_output": { "partition": [1, 0, 1, 2, 2, 2], - "modularity_score": 0.1757322, + "modularity_score": 0.215969, }, }, "data_2": { @@ -88,7 +88,7 @@ "partition": [6, 6, 3, 3, 1, 5, 5, 3, 0, 3, 1, 6, 3, 3, 4, 4, 5, 6, 4, 6, 4, 6, 4, 4, 2, 2, 4, 4, 2, 4, 0, 2, 4, 4], # fmt: on - "modularity_score": 0.3468113, + "modularity_score": 0.41880345, }, }, }