Open haorannlp opened 4 years ago
Hello, I would like to ask you what's the use of "tol = 5" in "ismember" function and "- 1" in np.all(..., axis = - 1)? Looking forward to your answer:)
tol = 5
rounds to the fifth decimal place in np.round
and np.all(..., axis = - 1)
checks to see if all the entries along the last axis evaluate to True. Taken together np.all(np.round(a - b[:, None], tol) == 0, axis=-1)
will be True
if all entries of a
and b[:, None]
are the same (within five decimal of precision) and False otherwise
Hi! I notice that in your implementation, the "Ismember" function in preprocessing.py is different from Tkipf's. I tested a few toy examples, found that your implementation would wrongly classify a member edge as a non-member edge. Since the whole adjacency matrix is sparse, the overall performance is not affected by this bug. Could you pls help me check it out? Thank you so much.