Change Password

Input error
Input error
Input error
Submit

Change Nickname

Current Nickname:
Submit
Search
v2.x
    v4.0

    Adamic-Adar Index

      Basic  

    Overview

    Adamic-Adar index is a node similarity metric defined based on the structured information of the internet, this is how it differs from Jaccard similarity (semi-structured information). AA index uses the weights of the common neighbor nodes of two nodes as the similarity of the two nodes, it was proposed by Lada A. Adamic and Eytan Adar in 2003.

    Related materials are as below:

    Basic Concept

    Node Weight

    In AA index, the weight of a node x is defined as the reciprocal of the logarithm based on 10 of the number of neighbors Γ(x) of x. Note that x is not included in its neighbors and neighbors are deduplicated:

    Known from the definition, the weight of the yellow node in the graph below is: 1/(log4) = 1.6610, the weight of the green node is: 1/(log3) = 2.0959.

    AA Similarity

    AA similarity between nodes x and y is the sum of weights w(z) of their common neighbors z. Note that x and y are not included in the common neighbors and common neighbors are deduplicated:

    Still taking the previous graph as an example, AA similarity of the blue and red nodes is the sum of weights of the yellow and green nodes, which is 1/(log4) + 1/(log3) = 3.7569.

    Special Case

    Lonely Node, Disconnected Graph

    There is no edge between lonely node and any other nodes in the graph, Ultipa AA Index algorithm does not calculate AA index between lonely node and any other node, nor does it calculate AA index between two nodes in different connected components.

    Self-loop Edge

    AA Index algorithm ignores all self-loop edges when calculating neighbor nodes.

    Directed Edge

    For directed edges, AA Index algorithm ignores the direction of edges but calculates them as undirected edges.

    Results and Statistics

    Take the graph below as an example, run the AA Index algorithm in the graph:


    Algorithm results: Calculate AA index for each edge (its the start node and end node), return edge_uuid and adamic_adar_value

    edge_uuid adamic_adar_value
    1 2.0959032
    2 2.0959032
    3 5.4178314
    4 2.0959032
    5 2.0959032
    6 0.0000000

    Algorithm statistics: N/A

    Command and Configuration

    • Command: algo(adamic_adar)
    • Configurations for the parameter params():
    Name Type Default Value Specification Description
    limit int -1 >=-1 Number of results to return; return all results if sets to -1 or not set

    Ultipa AA Index algorithm calculates the AA similarity of all adjacent node pairs (connected by edge) in the whole graph.

    Algorithm Execution

    Task Writeback

    1. File Writeback

    File Configuration Item Data in Each Row
    filename edge_uuid, adamic_adar_value

    Example: Calculate AA index of all adjacent node pairs, write the algorithm results back to file named aa

    algo(adamic_adar).params().write({
      file:{ 
        filename: "aa"
      }
    })
    

    2. Property Writeback

    Property Configuration Item Writeback Content Property Type Property Data Type
    property adamic_adar_value Edge property float

    Example: Calculate AA index of all adjacent node pairs, write the AA index back to edge property named aaIndex

    algo(adamic_adar).params().write({
      db:{ 
        property: "aaIndex"
      }
    })
    

    3. Statistics Writeback

    This algorithm has no statistics.

    Direct Return

    Alias Ordinal Type Description Column Name
    0 []perEdge Edge and AA index of its node pair edge_uuid, adamic_adar_value

    Example: Calculate AA index of all adjacent node pairs, define algorithm results as alias named aa, and return the results

    algo(adamic_adar).params() as aa
    return aa
    

    Streaming Return

    Alias Ordinal Type Description Column Name
    0 []perEdge Edge and AA index of its node pair edge_uuid, adamic_adar_value

    Example: Calculate AA index of all adjacent node pairs, define algorithm results as alias named aa, return the results ordered by the the ascending UUID of edges

    algo(adamic_adar).params().stream() as aa
    return aa order by aa.edge_uuid
    

    Real-time Statistics

    This algorithm has no statistics.

    Please complete the following information to download this book
    *
    公司名称不能为空
    *
    公司邮箱必须填写
    *
    你的名字必须填写
    *
    你的电话必须填写
    *
    你的电话必须填写