Creating adjacency matrix
bdqnghi opened this issue · 1 comments
For the part to create the adjacency matrix, it's not clear to me.
For example, we have 2 edges:
2 1 3
1 1 2
Then from the code implementation here:
https://github.com/JamesChuanggg/ggnn.pytorch/blob/master/utils/data/dataset.py#L79
Supposed there are 4 node types and 2 edges types, then Row = 4 , Column = 4 X 2 X 2 = 16
Then we get the 4 X 16 Matrix M :
[[0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0.]
[1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0.]
[0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]
Where:
M[2][1] = 1
M[1][10] = 1
M[1][0] = 1
M[0][9] = 1
What kind of adjacency matrix like this? I've checked the paper, it doesn't mention anything similar to this. I suspect that this is the matrix from Figure 1, section 3.2 of the paper that illustrates how nodes in the graph communicate with each other, in this case, it should be a 4 X 8 Matrix, not 4 X 16.
Please help me to enlighten my understanding.
Thanks!!!
I sorted this out myself, thanks : )