Skip to content

@graphty/algorithms / index / getTopCandidatesForNode

Function: getTopCandidatesForNode() ​

getTopCandidatesForNode(graph, node, options): LinkPredictionScore[]

Defined in: link-prediction/common-neighbors.ts:133

Get top candidates for link prediction for a specific node

Parameters ​

graph ​

Graph

The input graph

node ​

NodeId

The node ID to get candidates for

options ​

LinkPredictionOptions & object = {}

Link prediction options with optional candidate list

Returns ​

LinkPredictionScore[]

Array of top link prediction candidates sorted by score descending