使用Neo4j计算节点中心性——紧密度中心性(Closeness Centrality)、介数中心性(betweenness Centrality),适用于v3.5 以上的Graph Algorithms plugin。
一、计算紧密度中心性 CALL algo.closeness.stream(\’v\’,\’same-sentence\’,{direction:\’out\’})YIELD nodeId, centralityMATCH (word:v) WH活动:慈云数据爆款香港服务器,CTG+CN2高速带宽、快速稳定、平均延迟10+ms 速度快,免备案,每月仅需19元!! 点击查看ERE id(word) = nodeIdRETURN word.name AS word,centralityORDER BY centrality DESC;
参考:https://neo4j.com/docs/graph-algorithms/current/labs-algorithms/closeness-centrality/
?
二、计算介数中心性 CALL algo.betweenness.stream(\’n\’,\’same-sentence\’,{direction:\’out\’})YIELD nodeId, centralityMATCH (word:n) WHERE id(word) = nodeIdRETURN word.name AS word,centralityORDER BY centrality DESC;
参考:https://neo4j.com/docs/graph-algorithms/current/labs-algorithms/betweenness-centrality/
59589887
《neo4j大数据,neo4j 算法介绍》来自互联网同行内容,若有侵权,请联系我们删除!
还没有评论,来说两句吧...