knn_graph function outputs #4469
-
Hi everyone, I am a little bit confused about nn.knn_graph function. This function generates an undirected graph by b matching methods in which each node's degree is k, but when I convert the edge index to Adjacency matrix sum of the rows is not k and nodes have different degrees (flow argument is the default, 'source_to_target'). could you please explain the output of this function to me (more than its doc)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Can you share some reproducible example for this? This is definitely undesired, and all nodes should have exactly k neighbors. Note that this function will not compute an undirected graph though, as the neighbors for two nearby nodes may be different. |
Beta Was this translation helpful? Give feedback.
Can you share some reproducible example for this? This is definitely undesired, and all nodes should have exactly k neighbors. Note that this function will not compute an undirected graph though, as the neighbors for two nearby nodes may be different.