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
build symmetric adjacency matrix #3
Comments
Yes, for binary adjacency matrices you are right. In all other cases you need the last term to ensure that only a single edge is kept (the one with largest weight). |
I do not understand why adj matrix should be turned into a symmetric matrix. Could you please clarify it? |
@fansariadeh. Based on my understanding, the original GCN paper considers undirected graphs. In some datasets, the graph may not be undirected ( e.g. store as the directed graph). This line of code can make sure the input graph be undirected. |
Dear @baojianzhou |
Hi tkipf, thank you for your amazing work!
in utils.py, starts from Line 36,
As far as I understand, these lines are turning a directed adjacency matrix into an undirected adjacency matrix?
Since adj is a 0-1 matrix, then for the positions
adj[i,j]
whereadj.T > adj
, we should haveadj[i,j] = 0
, so the- adj.multiply(adj.T > adj)
part is always zero.Then what's the purpose of having that part, or am I understand it incorrectly?
The text was updated successfully, but these errors were encountered: