From 1b0a8b6b0171003eca267fd82b37e1f36302d80b Mon Sep 17 00:00:00 2001 From: Anqi Date: Wed, 2 Aug 2023 15:00:23 +0800 Subject: [PATCH] fix the computation approach for weight between different communities --- .../scala/com/vesoft/nebula/algorithm/lib/LouvainAlgo.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nebula-algorithm/src/main/scala/com/vesoft/nebula/algorithm/lib/LouvainAlgo.scala b/nebula-algorithm/src/main/scala/com/vesoft/nebula/algorithm/lib/LouvainAlgo.scala index 2b5c0fa..22bf16a 100644 --- a/nebula-algorithm/src/main/scala/com/vesoft/nebula/algorithm/lib/LouvainAlgo.scala +++ b/nebula-algorithm/src/main/scala/com/vesoft/nebula/algorithm/lib/LouvainAlgo.scala @@ -143,7 +143,7 @@ object LouvainAlgo { LOGGER.info("============================== step 2 =======================") //get edges between different communities val edges = G.triplets - .filter(trip => trip.srcAttr.cId != trip.dstAttr.cId) + // .filter(trip => trip.srcAttr.cId != trip.dstAttr.cId) .map(trip => { val cid1 = trip.srcAttr.cId val cid2 = trip.dstAttr.cId