You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A question about negative samples generation in preprocessing.py #70
Why does validation set use ismember([idx_j, idx_i], train_edges) and ismember([idx_i, idx_j], val_edges) instead of ismember([idx_i, idx_j], edges_all)?
I gave it some thought, and I realized that the negative validation/training samples should be able to sample from the test's samples, otherwise the algorithm would have an edge over the test samples.
In other words, edges in the test set can be sampled as negative examples in the validation/training sets (this could happen in a real world scenario).
So, this explain why ismember is segregated in train_edges and val_edges. However, there is this line:
Activity
gonzalesMK commentedon Oct 19, 2021
Hi, I had the same issue.
I gave it some thought, and I realized that the negative validation/training samples should be able to sample from the test's samples, otherwise the algorithm would have an edge over the test samples.
In other words, edges in the test set can be sampled as negative examples in the validation/training sets (this could happen in a real world scenario).
So, this explain why ismember is segregated in train_edges and val_edges. However, there is this line:
assert ~ismember(val_edges_false, edges_all)Which I don't understand the purpose of.
lif323 commentedon Dec 14, 2021
I understand why
assert errorappears sometimes when running the program. This is becauseval_edge_falsemay appear inedges_all.lif323 commentedon Dec 14, 2021
Hi,
I think a program without
assert error, that is, the correct code, is equivalent to the following code:sheenahora commentedon Feb 10, 2022
Hello, I am having the same issue.
assert ~ismember(val_edges_false, edges_all)
AssertionError
Did anyone find the solution? Kindly help.