Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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.
Where 𝑁(𝑢) is the set of nodes adjacent to u.
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.
Suppose we have the graph below:
Running the algorithm between Jenny and Dan will give us a result of 1/log(2)=3.321931.
Name
Description
Data type
a
A vertex.
VERTEX
b
A vertex.
VERTEX
e_type
Edge types to traverse.
SET<STRING>
The algorithm calculates the total number of neighbors of two vertices.
The total number of neighbors of two vertices.
Suppose we have the following graph.
Dan and Jenny together have 6 neighbors in total. Running the algorithm between Dan and Jenny would give us a result of 6. Note that since Jenny and Dan are neighbors themselves, the union of their neighbors includes both Jenny and Dan:
Name
Description
Data type
a
A vertex.
VERTEX
b
A vertex.
VERTEX
e_type
Edge types to traverse.
SET<STRING>
Preferential Attachment is a measure to compute the closeness of vertices, based on the number of their neighbors. The algorithm returns the product two vertices' number of neighbors.
For more information, see Preferential Attachment.
The product of the number of neighbors of the two vertices.
Suppose we have the following graph:
Since Dan has four neighbors, while Jenny has three, the return value of the algorithm is 3∗4=12:
The Common Neighbors algorithm calculates the number of common neighbors between two vertices.
The number of common neighbors between two vertices.
Suppose to have the following graph:
Running the algorithm between Dan and Jenny will show that they have 1 common neighbor:
Resource Allocation is used to compute the closeness of nodes based on their shared neighbors. It is computed by the following formula:
Where 𝑁(𝑢) is the set of nodes adjacent to u.
Suppose we have the following graph:
Since Dan and Jenny has one shared neighbor Tom
, who has two neighbors, running the algorithm between Dan and Jenny with friendship edges would give us a result of 0.5.
Name
Description
Data type
a
A vertex.
VERTEX
b
A vertex.
VERTEX
e_type
Edge types to traverse.
SET<STRING>
Name | Description | Data type |
| A vertex. |
|
| A vertex. |
|
| Edge types to traverse. |
|
Name | Description | Data type |
| A vertex. |
|
| A vertex. |
|
| Edge types to traverse. |
|
This algorithm takes two vertices, and returns 1 if they two vertices are in the same community, and returns 0 if they are not in the same community.
The algorithm assumes that community detection has already completed and that a community ID is stored in an integer attribute on each vertex.
Returns 1 if the two vertices are in the same community.
Returns 0 if the two vertices are not in the same community.
Suppose we have the following vertices:
Their community IDs were generated by running the weakly connected component algorithm on the graph. If we run the algorithm between Kevin and Jenny, we get 1 because the two vertices are in the same community as indicated by their community
attribute:
Name
Description
Data type
a
A vertex.
VERTEX
b
A vertex.
VERTEX
communityAttribute
The community attribute used to store a vertex’s community ID.
STRING