Skip to content

@graphty/algorithms / index / commonNeighborsScore

Function: commonNeighborsScore() ​

commonNeighborsScore(graph, source, target, options): number

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

Calculate common neighbors score for a pair of nodes

Parameters ​

graph ​

Graph

The input graph

source ​

NodeId

The source node ID

target ​

NodeId

The target node ID

options ​

LinkPredictionOptions = {}

Link prediction options

Returns ​

number

The number of common neighbors