Open riccardobucco opened 5 years ago
Have a look here: https://github.com/tkipf/gcn/issues/12
On Tue 30. Oct 2018 at 16:50 Riccardo Bucco notifications@github.com wrote:
Hi Thomas, I'm trying to reproduce the karate club example of your paper using the code of this repo. I can't understand how the data should be saved to match your load_data function. For example, what about the features of the training/test nodes? I know that the X matrix should be the Identity one, but what's its size? I would appreciate some help, thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tkipf/gcn/issues/64, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAcYA4I9kc_ZUywpLxQm8uft71fKyZtks5uqHVUgaJpZM4YCP4M .
Sorry for the trivial question.. Which nodes did you use for training/validating/testing? I'm trying to build the three datasets (and respective masks) and i'm not sure about the steps. So far I have understood what follows:
Is it correct? Now, how can I build the three datasets? I don't know if I'm wrong: in your example you labeled only 4 nodes, but you train using also the others (so the training set has N nodes, 4 of which are labeled). This means that y_train must have only 4 vectors using the onehot encoding, while train_mask must have all the elements set to True? Then you test against the previously unlabeled nodes (N-4), right? So y_test will have only 4 vectors set to zero and test_mask will have the 4 corresponding values set to False. And what about the validation set? You don't use it, do you?
Thanks in advance, and sorry for making trivial questions.
You can simply set y_train=y_val=y_test
and also provide the full adjacency matrix and the full feature matrix (i.e., an identity matrix) during training and testing. It suffices to simply provide train_mask
with elements set to True
for all nodes that should receive supervision and False
otherwise.
Thanks. Also, does this approach work only with a fixed graph? I mean, let's say I want to add a single node to the graph: do I have to train everything again in order to predict the category of this new node?
You can make predictions on new nodes if their feature vectors come from a similar underlying distribution. If you take unique one-hot vectors as feature vectors (i.e., an identity matrix), then this is not possible (the prediction would mostly be just random).
What's the dimension of the three layers?
out2 is 4 right? What about the output dimension of the first layer (out1)? Also, the three activation functions are tanh, right?
Yes and yes!
On 5 Nov 2018, at 13:24, Riccardo Bucco notifications@github.com wrote:
What's the dimension of the three layers?
input --> 34, output --> out1 input --> out1, output --> out2 input --> out2, output --> 2 out2 is 4 right? What about the output dimension of the first layer (out1)? Also, the three activation functions are tanh, right?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tkipf/gcn/issues/64#issuecomment-435856164, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAcYM25ji5spVuklCJi_bquUS4siU61ks5usC3ogaJpZM4YCP4M.
what about the out1 dimension? I can't find its value anywhere
Same
On Mon 5. Nov 2018 at 14:53 Riccardo Bucco notifications@github.com wrote:
what about the out1 dimension? I can't find its value anywhere
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/tkipf/gcn/issues/64#issuecomment-435881793, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAcYAvmbnxoXqsW0_5aRPV9jRzfGoa5ks5usELugaJpZM4YCP4M .
Sorry to bother you, thanks for your code! It has given me lots of help. But when I try using the karate dataset, I am still confused for two trivial questions:
@AugF did you find the solution?
I am also looking for code of y_train, y_val, y_test for karate club.
Thanks in advance !
Hi Thomas, I'm trying to reproduce the karate club example of your paper using the code of this repo. I can't understand how the data should be saved to match your load_data function. For example, what about the features of the training/test nodes? I know that the X matrix should be the Identity one, but what's its size? I would appreciate some help, thanks!