RoyZhengGao / edge2vec

Learning node representation using edge semantics
BSD 3-Clause "New" or "Revised" License
51 stars 22 forks source link

zero_method 'wilcox' and 'pratt' do not work if the x - y is zero for all elements. #6

Open DennisShaw opened 4 years ago

DennisShaw commented 4 years ago

ValueError: zero_method 'wilcox' and 'pratt' do not work if the x - y is zero for all elements.

naman-ali commented 3 years ago

@DennisShaw Were you able to solve this issue?

GTFoster commented 2 years ago

I've also run into the same issue. I got this error when trying to run the first bash command suggested by the readme file after cloning the repository.

hajarmerbouh commented 1 year ago

The error means that either wilcoxon or pratt is having as an input two identical lists : For a given list=List1, wilcoxon(List1,List1) returns error; in other words, x-y is zero for all elements which points out the erreur.

In order to avoid it, we'll have to make sure that repo[i]!=repo[j] (the inputs of wilcox). So we need to apply the following adjustements (mentionned in bold):

[267] for i in range(type_size-1): print ("repo ",i, ": ",repo[i],type(repo[i])) for j in range(i+1, type_size):
if evaluation_metric == 1: etc.. This way, 'i' will always be different from 'j' and so repo[i] and repo[j] won't be identical.

abbynewbury commented 1 year ago

I just wanted to check in regarding this issue, if the above comment is the verified solution to the issue and should be implemented? Or was there another method that the authors intended and that is why this comment status is left on 'Open'. Thanks!