修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

搜索
    中文

      共同邻居

      ✓ 文件回写 ✕ 属性回写 ✓ 直接返回 ✓ 流式返回 ✕ 统计值

      拓扑链接预测(Topological Link Prediction)算法使用不同的指标并利用节点的拓扑属性来评估节点对之间的相似度,相似度分值较高则意味着(目前还没有连接的)两个节点在未来产生连接的可能性更大。

      概述

      共同邻居(Common Neighbors)算法计算两个节点之间共同邻居的数量,作为衡量它们相似性的指标。

      该算法背后的逻辑是,如果两个节点有大量的共同邻居,它们很可能在某种意义上相似或产生连接。它的计算公式如下:

      其中,N(x) 和 N(y) 分别是与节点 x 和节点 y 相连的节点集合。

      共同邻居数量较多表示节点间的相似度较大,数量为 0 则表示两个节点间没有相似性。

      在上图中,CN(D,E) = |N(D) ∩ N(E)| = |{B, F}| = 2。

      特殊说明

      • 共同邻居算法忽略边的方向,按照无向边进行计算。

      语法

      • 命令:algo(topological_link_prediction)
      • 参数:
      名称
      类型
      规范
      默认
      可选
      描述
      ids / uuids []_id / []_uuid / / 待计算的第一组节点的 ID / UUID;算法将 ids/uuids 中的每个节点与 ids2/uuids2 中的每个节点配对进行计算
      ids2 / uuids2 []_id / []_uuid / / 待计算的第二组节点的 ID / UUID;算法将 ids/uuids 中的每个节点与 ids2/uuids2 中的每个节点配对进行计算
      type string Common_Neighbors Adamic_Adar 相似度衡量指标;计算共同邻居时,保持此项为Common_Neighbors
      limit int >=-1 -1 返回的结果条数,-1 返回所有结果

      示例

      示例图如下:

      文件回写

      配置项 回写内容
      filename node1,node2,num
      algo(topological_link_prediction).params({
        uuids: [3],
        uuids2: [1,5,7],
        type: 'Common_Neighbors'
      }).write({
        file:{ 
          filename: 'cn'
        }
      })
      

      结果:文件 cn

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

      直接返回

      别名序号
      类型
      描述 列名
      0 []perNodePair 点对及相似度 node1, node2, num
      algo(topological_link_prediction).params({
        ids: 'C',
        ids2: ['A','C','E','G'],
        type: 'Common_Neighbors'
      }) as cn 
      return cn 
      

      结果:cn

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

      流式返回

      别名序号
      类型
      描述 列名
      0 []perNodePair 点对及相似度 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
      

      结果:cn

      node1 node2 num
      3 4 2
      3 5 2
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写