Preferential Attachment
Preferential Attachment is a measure to compute the closeness of vertices based on the number of their neighbors. The algorithm returns the product of the number of neighbors of the first vertex and the number of neighbors of the second vertex.
For more information, see Preferential Attachment.
Notes
Preferential attachment as a metric works best on graphs that have an "unequal" structure where a majority of vertices have few connections and a minority of vertices have many connections.
This algorithm ignores edge weights.
Specifications
CREATE QUERY tg_preferential_attachment(VERTEX v_source VERTEX v_target,
SET<STRING> e_type)
Parameters
Name  Description  Data type 


The first vertex to compare. Provide the vertex ID and type as a tuple: 
N/A 

The second vertex to compare with the first. Provide the vertex ID and type as a tuple: 
N/A 

Edge types to traverse. 
(A blank set of strings) 