Skip to content
Discussion options

You must be logged in to vote

k-nearest neighbor graphs are always directed. You can make it undirected as follows:

adj11 = adj11 + adj11.T
adj11[adj > 1] = 1.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@adhikarirsr
Comment options

@rusty1s
Comment options

Answer selected by adhikarirsr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants