node2vec icon indicating copy to clipboard operation
node2vec copied to clipboard

About "walkLength" of node2vec_spark

Open HaominYu opened this issue 8 years ago • 5 comments

Hi

I have a question about the "walkLength"

OK, this file "Node2vec.scala" github

My point of view has any problem?

Thanks

Best Yu

HaominYu avatar Nov 21 '17 04:11 HaominYu

why the variable named as "pathBuuffer" already has 2 elements? actually is empty in my mind.

aijianiula0601 avatar Nov 28 '17 02:11 aijianiula0601

hi, aijianiula0601 You can look the previous code, or run it, have a try

Thanks

HaominYu avatar Dec 15 '17 02:12 HaominYu

I think the total length of walks is (numWalks * walkLength) + 2.

ghost avatar Jan 10 '18 02:01 ghost

why the length of walks is |walkLength|+2 instead of |walkLength|+1?

datazhen avatar Apr 25 '18 15:04 datazhen

I think @HaominYu is right. The graph initializes the pathBuffer size to 2, which contains the initial vertex and the next node. So the generated sentences length is definitely walkLength + 1.

Nirvanada avatar Jun 07 '18 09:06 Nirvanada