Skip to content

Pruning links using nearest neighbor algorithm

ikb6 edited this page Jul 29, 2024 · 3 revisions

The nearest neighbor algorithm models a minimum spanning tree in the context of a network.

Networks with large numbers of edges (links between nodes) can be difficult to view and analyze. In such cases, applying Minimum Spanning Tree logic to the network might be helpful. In the context of a network, we call this the Nearest Neighbor method. This algorithm connects the closest nodes together, giving a view of genetic relatedness. Thus for each node, the shortest link to its neighbor is preserved. When there are ties in link-lengths, all links with the same minimum length, i.e., equally close neighbors, are included.

The epsilon parameter allows us to include the 2nd closest and 3rd closest neighbors and so on. Its default value is 0.001, and increasing it allows more distant neighbors to be linked.

NearetNeighborWiki

Clone this wiki locally