Neo4j算法介绍

2020-02-14  本文已影响0人  thirsd

neo4j为图数据库,其中涉及的也就为图算法,图算法被用来度量图形,节点及关系。

在neo4j中,通过call algo.list() 可查看neo4j中的算法列表。

Neo4j提供了两个常用的算法库-----apoc和algo。
相对于algo,apoc不仅仅提供了一些算法实现,还提供了数据导入等功能,更多地像一个工具包。
而在算法实现方面,algo显得更专业、全面。

algo的官方地址:https://github.com/neo4j-contrib/neo4j-graph-algorithms

一.  中心性算法(Centrality algorithms)
  中心度算法主要用来判断一个图中不同节点的重要性:
  (1)PageRank(页面排名算法,algo.pageRank)
  (2)ArticleRank(文档排名算法,algo.articleRank)
  (3)Betweenness Centrality(中介中心性,algo.betweenness)
  (4)Closeness Centrality(紧密中心性,algo.closeness)
  (5)Harmonic Centrality(谐波中心性(这个翻译一直拿不准),algo.closseness)
  (6)Eigenvecor Centrality (特征向量中心性,algo.eigenvector)
  (7)Degree Centrality(度中心性,algo.degree)
       
二. 社区发现算法(Community detection algorithms)
  评估一个群体是如何聚集或划分的,以及其增强或分裂的趋势:
 (1)Louvain(鲁汶算法,algo.louvain)
 (2)Label Propagation(标签传播算法,algo.labelPropagagtion)
 (3)Connected Components(连通组件算法,algo.unionFind)
 (4)Strongly Connected Compontents(强连通组件,algo.scc)
 (5)Triangle Counting/Clustering Coefficient(三角计数/聚类系数,algo.triangleCount)
 (6) Balanced Triads(平衡三角算法,algo.balancedTriads)
        
三. 路径寻找算法(Path Finding algorithms)     
  用于找到最短路径,或者评估路径的可用性和质量:
  (1)Minimum Weight Spanning Tree(最小权重生成树,algo.mst)
  (2)Shortest Path(最短路径,algo.shortestPath)
  (3)Single Source Shortesr Path(单源最短路径,algo.shortestPath.deltastepping)
  (4)All Pairs Shortest Path (全节点对最短路径,algo.allShortestPath)
  (5)A* (A star, algo.shortestPath.astar)
  (6)Yen’s K-shortest paths(Yen k最短路径,algo.kShortestPaths)
  (7)Random Walk(随机路径,algo.randomWalk)

四.相似度算法(Similarity algorithms)
  用于计算节点间的相似度:
  (1)Jaccard Similarity(Jaccard相似度,algo.similarity.jaccard)
  (2)Consine Similarity(余弦相似度,algo.similarity.consine)
  (3)Pearson Similarity(Pearson相似度,algo.similarity.pearson)
  (4)Euclidean Distance(欧式距离,algo.similarity.euclidean)
  (5)Overlap Similarity(重叠相似度,algo.similarity.overlap)

五. 链接预测算法(Link Prediction algorithms)
  下面算法有助于确定一对节点的紧密程度。然后,我们将使用计算的分数作为链接预测解决方案的一部分:
  (1)Adamic Adar(algo.linkprediction.adamicAdar)
  (2)Common Neighbors(相同邻居,algo.linkprediction.commonNeighbors)
  (3)Preferential Attachment(择优连接,algo.linkprediction.preferentialAttachment)
  (4)Resource Allocation(资源分配,algo.linkprediction.resourceAllocation)
  (5)Same Community(相同社区,algo.linkprediction.sameCommunity)
  (6)Total Neighbors(总邻居,algo.linkprediction.totalNeighbors)

六 预处理算法(Preprocessing functions and procedures)
  数据处理过程:
  (1)One Hot Encoding (algo.ml.oneHotEncoding)

参考:https://blog.csdn.net/name__student/article/details/89405008
参考:https://blog.csdn.net/haveanybody/article/details/87911743

上一篇 下一篇

猜你喜欢

热点阅读