snap-stanford / SATURN

MIT License
108 stars 17 forks source link

BugFix #26

Closed moinfar closed 9 months ago

moinfar commented 1 year ago

Hi,

I think idx1 is supposed to form a random pairing for x1 (that is x2). So, you should choose from 0 to x1.shape[0] not from 0 to embeddings.shape[1] that is irrelevant to the x1.

This may even raise out-of-bound errors is some edge cases.

Yanay1 commented 9 months ago

Good catch! I implemented this in the latest commit as well as updated the default hyperparameter value for pe_sim_penalty to 0.2. Thanks!