-
Notifications
You must be signed in to change notification settings - Fork 60
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
Question on output #15
Comments
Hi! If you add sigmoid to the last layer, the output will be restricted to [0,1], which can be seen as link probabilities. If you want to map them to link existence, you can set a threshold such as 0.5 to classify all links with > 0.5 probability as positive links. In your example, apparently all links have similar (near 0.5) probabilities, which might suggest the model isn't well trained. You may increase the train_percent to something larger. If you only want to evaluate ranking metrics such as AUC/Hits/MRR, you don't need the sigmoid. The repo supports directly outputting the ranking metric numbers. |
Thanks Mr M.Zhang for the response. I was just running a first time training and use that model to predict and get data for understanding. After reading your paper and code I notice that:
Sorry if those question annoy you. I'm currently study on this aspect and want to understand deeply. |
|
Very much thank you. I also have another question. In this #2 you have said that using node embedding will make GNN not inductive. But as far as I know GNN already embedding the node into matrix E so why adding the node embedding algorithm will make it not inductive. Please correct me if I'm wrong. Another things when you said [1,2,3] and [2,1,3] in your example. Is that the feature of node itself or this representations is for the structure of those node surrounded and any one that have the same node surrounded is more likely "have a linked". I didn't quite get your idea about this. I really appreciate your help when responding those questions for me. |
GNN learns node embeddings in an inductive way, but traditional network embedding methods such as node2vec/DeepWalk embeds nodes in a transductive way (do not generalize to unseen nodes). [1,2,3] and [2,1,3] mean node representations before SortPooling (i.e., their graph structure has been absorbed into node representations through graph convolution). These two are isomorphic graphs, so their node representations are the same, up to a permutation of node ordering. After sorting, [1,2,3] and [2,1,3] become the same, meaning that SortPooling can map isomorphic graphs to the same representation. |
Hi M. Zhang
I'm a Master student and currently I'm studying in this aspect. Can I ask you some couple question ?
I'm getting your repo and after adding the sigmoid to the last layer. I run a little sample sample on it and this is my command line:
python seal_link_pred.py --dataset PubMed --batch_size 12 --train_percent 0.1 --val_percent 0.1 --test_percent 0.1 --num_hops 3 --use_feature --epochs 20 --dynamic_train --dynamic_val --dynamic_test --only_test
And I got an output like this
tensor([[0.4867],
[0.4875],
[0.4858],
[0.4848],
[0.4854],
[0.4865],
[0.4855],
[0.4850]])
Can you tell me more out what's does the output mean, and how i map the result to the predict link ?
The text was updated successfully, but these errors were encountered: