-
Notifications
You must be signed in to change notification settings - Fork 280
What does node2vec expect in .wv method? #5
Copy link
Copy link
Open
Description
Hello,
I;m working through chapter 4. In the prediction of the test set, you use train_mask_str in the book but in your gh code you use train_mask. Depending on which one you use one gets very different results.
if you pass the integer mask you get something that won't go pass 60% accuracy.
y_pred = clf.predict(node2vec.wv[test_mask])
acc = accuracy_score(y_pred, labels[test_mask])
print(f'Node2Vec accuracy = {acc*100:.2f}%')
>>>Node2Vec accuracy = 59.09%
But if i pass the string mask i get what you report both in gh and the book . Which seems really high considering how many samples you pick out in the train and test.
y_pred = clf.predict(node2vec.wv[test_mask_str])
acc = accuracy_score(y_pred, labels[test_mask])
print(f'Node2Vec accuracy = {acc*100:.2f}%')
>>>Node2Vec accuracy = 95.45%
How can one explain this discrepancy?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels