Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation set generated but never used #6

Open
saedr opened this issue Dec 16, 2019 · 1 comment
Open

Validation set generated but never used #6

saedr opened this issue Dec 16, 2019 · 1 comment

Comments

@saedr
Copy link

saedr commented Dec 16, 2019

Dear Phi, In the following piece of code you generate the validation set but never return it, instead you use the test set instead of validation set and there is no actual test set to be used for testing purposes.

val_edges_false = []
while len(val_edges_false) < len(val_edges):
idx_i = np.random.randint(0, adj.shape[0])
idx_j = np.random.randint(0, adj.shape[0])
if idx_i == idx_j:
continue
if ismember([idx_i, idx_j], train_edges):
continue
if ismember([idx_j, idx_i], train_edges):
continue
if ismember([idx_i, idx_j], val_edges):
continue
if ismember([idx_j, idx_i], val_edges):
continue
if val_edges_false:
if ismember([idx_j, idx_i], np.array(val_edges_false)):
continue
if ismember([idx_i, idx_j], np.array(val_edges_false)):
continue
val_edges_false.append([idx_i, idx_j])

Am I missing something?

@vuptran
Copy link
Owner

vuptran commented Jan 22, 2020

@saedr sorry for the really late response. You are correct, I don't use the val set, but subsume it into the training set. The test set (see below) is used for testing purposes.

https://github.com/vuptran/graph-representation-learning/blob/master/longae/utils_gcn.py#L183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants