The common neighbors approach supports the following hypothesis:
Two people who have a friend in common are more likely to be introduced than those who don’t have any friends in common.
The common neighbors metric measures the size of the set of common friends between u and v:
score(u, v) = | N(u) ∩ N(v) |
In the GDS plugin, link prediction metrics are functions and can be computed using the following:
MATCH (u) MATCH (v)
RETURN id(u), id(v), gds.alpha.linkprediction.commonNeighbors(u, v)