修改密码

请输入密码
请输入密码 请输入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)算法使用不同的指标并利用节点的拓扑属性来评估节点对之间的相似度,相似度分值较高则意味着(目前还没有连接的)两个节点在未来产生连接的可能性更大。

      概述

      资源分配(Resource Allocation)算法基于一个假设,即节点通过它们共同的邻居作为传输者来相互传递资源。在其基本形式中,我们假设每个传输者拥有一个单位的资源,这个资源均匀分布给它的所有邻居。因此,两个节点之间的相似度可以通过一个节点向另一个节点传输的资源量来衡量。这个概念由Tao Zhou、Linyuan Lü 和 Yi-Cheng Zhang 在 2009 年提出:

      它的计算公式如下:

      其中,N(u) 是与节点 u 相连的节点集合。对于两个节点的每个共同邻居 u,资源分配首先计算其度数 |N(u)| 的倒数,然后将所有共同邻居的这些倒数值相加。

      资源分配分值较高表示节点间的相似度较大,分值为 0 则表示两个节点间没有相似性。

      在上图中,N(D) ∩ N(E) = {B, F},则 RA(D,E) = 1|N(B)| + 1|N(F)| = 14 + 13 = 0.5833。

      特殊说明

      • 资源分配算法忽略边的方向,按照无向边进行计算。

      语法

      • 命令: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 Resource_Allocation Adamic_Adar 相似度衡量指标;计算资源分配时,保持此项为Resource_Allocation
      limit int >=-1 -1 返回的结果条数,-1 返回所有结果

      示例

      示例图如下:

      文件回写

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

      结果:文件 ra

      C,A,0.250000
      C,E,0.500000
      C,G,0.333333
      

      直接返回

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

      结果:ra

      node1 node2 num
      3 1 0.25
      3 5 0.5
      3 7 0.333333333333333

      流式返回

      别名序号
      类型
      描述 列名
      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: 'Resource_Allocation'
      }).stream() as ra
      where ra.num >= 0.3
      return ra
      

      结果:ra

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