How to make edge features undirected?
See original GitHub issue❓ Questions & Help
EDIT: Got the text back, it as in a comment markdown.
Hi!
I’ve realized that the to_undirected(edge_index, num_nodes=None)
function does not take the edge features list as an input, only the edge index list. Would the features list not also need to be modified when making a graph undirected?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to make edge features undirected? · Issue #914 - GitHub
I've realized that the to_undirected(edge_index, num_nodes=None) function does not take the edge features list as an input, only the edge ...
Read more >Edge List, Adjacency List, Adjacency Matrix - Why Graphs ...
Undirected graphs have edges that do not have a direction. With undirected graphs, we can represent two-way relationships so an edge can be...
Read more >Graph with undirected edges - MATLAB - MathWorks
Create a graph object with three nodes and two edges. One edge is between node 1 and node 2, and the other edge...
Read more >DGLGraph – Graph with node/edge features - DGL Docs
The graph stores nodes, edges and also their features. DGL graph is always directional. Undirected graph can be represented using two bi-directional edges....
Read more >Undirected Graphs - Algorithms, 4th Edition
Preferential attachment graphs. Create a random graph on V vertices and E edges as follows: start with V vertices v1, .., vn in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, there is not, but I agree that it would be cool to have 😃
This is not really defined in case of edge attributes. If you are sure that reverse edges do not result in duplicated edges, you can simply duplicate your
edge_attr
matrix:torch.cat([edge_attr, edge_attr], dim=0)
. In case this does not hold, you need some way to unify duplicate edges into a single representation (doable viatorch-scatter
). You can pick any method here, e.g., add, mean or max.