Adamic Adar (Beta)

The Adamic/Adar index is a measure introduced in 2003 by Lada Adamic and Eytan Adar to predict links in a social network, according to the number of shared links between two nodes. It is defined as the sum of the inverse logarithmic degree centrality of the neighbors shared by the two nodes.

A(x,y)=uN(x)N(y)1logN(u){A(x,y)=\sum _{u\in N(x)\cap N(y)}{\frac {1}{\log {|N(u)|}}}}

Where 𝑁(𝑢) is the set of nodes adjacent to u.

Specification

CREATE QUERY tg_adamic_adair(VERTEX a, VERTEX b, SET<STRING> e_type)

Parameters

Name

Description

Data type

a

A vertex.

VERTEX

b

A vertex.

VERTEX

e_type

Edge types to traverse.

SET<STRING>

Return value

The Adamic Adar index between two vertices. If the two vertices do not have common neighbors, the algorithm will return a division by 0 error.

Example

Suppose we have the graph below:

Running the algorithm between Jenny and Dan will give us a result of 1/log(2)=3.321931.

RUN QUERY tg_adamic_adar (("Jenny", "person"), ("Dan", "person"), ["friendship"])

Last updated