Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

Search

      Common Neighbors

      ✓ File Writeback ✕ Property Writeback ✓ Direct Return ✓ Stream Return ✕ Stats

      Overview

      The Common Neighbors algorithm computes the number of common neighbors between two nodes as a measure of their similarity.

      The logic behind this algorithm is that if two nodes have a high number of neighbors in common, they are likely to be similar or connected in some meaningful way. It is computed using the following formula:

      where N(x) and N(y) are the sets of adjacent nodes to nodes x and y respectively.

      More common neighbors indicate greater similarity between nodes, while a number of 0 indicates no similarity between two nodes.

      In this example, CN(D,E) = |N(D) ∩ N(E)| = |{B, F}| = 2.

      Considerations

      • The Common Neighbors algorithm ignores the direction of edges but calculates them as undirected edges.

      Syntax

      • Command: algo(topological_link_prediction)
      • Parameters:
      Name
      Type
      Spec
      Default
      Optional
      Description
      ids / uuids []_id / []_uuid / / No ID/UUID of the first set of nodes to calculate; each node in ids/uuids will be paired with each node in ids2/uuids2
      ids2 / uuids2 []_id / []_uuid / / No ID/UUID of the second set of nodes to calculate; each node in ids/uuids will be paired with each node in ids2/uuids2
      type string Common_Neighbors Adamic_Adar No Type of similarity; for Common Neighbors, keep it as Common_Neighbors
      limit int >=-1 -1 Yes Number of results to return, -1 to return all results

      Example

      The example graph is as follows:

      File Writeback

      Spec Content
      filename node1,node2,num
      algo(topological_link_prediction).params({
        uuids: [3],
        uuids2: [1,5,7],
        type: 'Common_Neighbors'
      }).write({
        file:{ 
          filename: 'cn'
        }
      })
      

      Results: File cn

      C,A,1.000000
      C,E,2.000000
      C,G,1.000000
      

      Direct Return

      Alias Ordinal Type
      Description
      Columns
      0 []perNodePair Node pair and its similarity node1, node2, num
      algo(topological_link_prediction).params({
        ids: 'C',
        ids2: ['A','C','E','G'],
        type: 'Common_Neighbors'
      }) as cn 
      return cn 
      

      Results: cn

      node1 node2 num
      3 1 1
      3 5 2
      3 7 1

      Stream Return

      Alias Ordinal Type
      Description
      Columns
      0 []perNodePair Node pair and its similarity node1, node2, num
      find().nodes() as n
      with collect(n._id) as nID
      algo(topological_link_prediction).params({
        ids: 'C',
        ids2: nID,
        type: 'Common_Neighbors'
      }).stream() as cn
      where cn.num >= 2
      return cn
      

      Results: cn

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