node2vec icon indicating copy to clipboard operation
node2vec copied to clipboard

Find a error when creating the edge2attr variable

Open wsgtcyx opened this issue 6 years ago • 3 comments

Hello! In the file "node2vec/node2vec_spark/src/main/scala/com/navercorp/Node2vec.scala", in the "randomWalk" function, I saw the edge2attr created and s"${edgeTriplet.srcId}${edgeTriplet.dstId}" as the key of edge, which is not a unique key Indeed. such as the edge of Node No.12 between Node No.14, and the edge of Node No1. between No.214. They are two different edges which have the same key? I think when performing the join operation, everything would go wrong.

Hope to receive your reply~ Thank for your code~ !

wsgtcyx avatar Jul 23 '19 01:07 wsgtcyx

Hello! In the file "node2vec/node2vec_spark/src/main/scala/com/navercorp/Node2vec.scala", in the "randomWalk" function, I saw the edge2attr created and s"${edgeTriplet.srcId}${edgeTriplet.dstId}" as the key of edge, which is not a unique key Indeed. such as the edge of Node No.12 between Node No.14, and the edge of Node No1. between No.214. They are two different edges which have the same key? I think when performing the join operation, everything would go wrong.

Hope to receive your reply~ Thank for your code~ !

you're right, I found the same error

Super-Louis avatar Dec 19 '19 13:12 Super-Louis

yes, how to fix it? Randomwalk result is wrong

caomeibaobao1994 avatar Jan 10 '20 06:01 caomeibaobao1994

insert a seprator between src and dstId, and same in "(paths.slice(paths.size-2, paths.size).mkString("_"), pathBuffer)" ?

snaillp avatar May 09 '20 07:05 snaillp