Skip to content

Commit fa91a9f

Browse files
authored
update algorithms desc (#38)
1 parent f2ac4d9 commit fa91a9f

File tree

2 files changed

+62
-9
lines changed

2 files changed

+62
-9
lines changed

README-CN.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ nebula-algorithm 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的
99
| Louvain | 社区发现 | 社团挖掘、层次化聚类|
1010
| KCore | K核 |社区发现、金融风控|
1111
| LabelPropagation | 标签传播 |资讯传播、广告推荐、社区发现|
12+
| Hanp | 标签传播进阶版|社区发现、推荐|
1213
| ConnectedComponent | 联通分量 |社区发现、孤岛发现|
1314
|StronglyConnectedComponent| 强联通分量 |社区发现|
1415
| ShortestPath | 最短路径 |路径规划、网络规划|
1516
| TriangleCount | 三角形计数 |网络结构分析|
1617
| GraphTriangleCount |全图三角形计数|网络紧密性分析|
1718
| BetweennessCentrality | 介数中心性 |关键节点挖掘、节点影响力计算|
19+
| Closeness | 接近中心性 |关键节点挖掘、节点影响力计算|
1820
| DegreeStatic | 度统计 |图结构分析|
1921
| ClusteringCoefficient | 聚集系数 |推荐、电信诈骗分析|
20-
| BFS |广度优先遍历 |层序遍历、最短路径规划|
22+
| Jaccard |杰卡德相似度计算|相似度计算、推荐|
23+
| BFS |广度优先遍历 |层序遍历、最短路径规划|
24+
| Node2Vec | - |图分类|
2125

2226
使用 `nebula-algorithm`,可以通过提交 `Spark` 任务的形式使用完整的算法工具对 `Nebula Graph` 数据库中的数据执行图计算,也可以通过编程形式调用`lib`库下的算法针对DataFrame执行图计算。
2327

@@ -28,10 +32,10 @@ nebula-algorithm 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的
2832
$ cd nebula-algorithm
2933
$ mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
3034
```
31-
编译完成后,在 `nebula-algorithm/target` 目录下会生成 `nebula-algorithm-2.0.0.jar` 。
35+
编译完成后,在 `nebula-algorithm/target` 目录下会生成 `nebula-algorithm-3.0-SNAPSHOT.jar` 。
3236
3337
2. 在 Maven 远程仓库下载
34-
https://repo1.maven.org/maven2/com/vesoft/nebula-algorithm/2.0.0/
38+
https://repo1.maven.org/maven2/com/vesoft/nebula-algorithm/
3539
3640
# 使用 Nebula Algorithm
3741
@@ -44,7 +48,7 @@ nebula-algorithm 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的
4448
* 提交算法任务
4549
4650
```
47-
${SPARK_HOME}/bin/spark-submit --master <mode> --class com.vesoft.nebula.algorithm.Main nebula-algorithm-2.0.0.jar -p application.conf
51+
${SPARK_HOME}/bin/spark-submit --master <mode> --class com.vesoft.nebula.algorithm.Main nebula-algorithm-3.0-SNAPSHOT.jar -p application.conf
4852
```
4953
* 使用限制
5054
@@ -77,6 +81,28 @@ nebula-algorithm 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的
7781
7882
> 注:执行算法的 DataFrame 默认第一列是源点,第二列是目标点,第三列是边权重。
7983
84+
## Nebula 中属性配置
85+
如果你想将算法结果写入到 Nebula,请确保 Nebula 的 tag 中有对应算法结果名称的属性。各项算法对应的属性名如下所示:
86+
87+
| Algorithm | property name |property type|
88+
|:------------------------:|:-----------------------:|:-----------:|
89+
| pagerank | pagerank |double/string|
90+
| louvain | louvain | int/string |
91+
| kcore | kcore | int/string |
92+
| labelpropagation | lpa | int/string |
93+
| connectedcomponent | cc | int/string |
94+
|stronglyconnectedcomponent| scc | int/string |
95+
| betweenness | betweenness |double/string|
96+
| shortestpath | shortestpath | string |
97+
| degreestatic |degree,inDegree,outDegree| int/string |
98+
| trianglecount | trianglecount | int/string |
99+
| clusteringcoefficient | clustercoefficient |double/string|
100+
| closeness | closeness |double/string|
101+
| hanp | hanp | int/string |
102+
| bfs | bfs | string |
103+
| jaccard | jaccard | string |
104+
| node2vec | node2vec | string |
105+
80106
## 版本匹配
81107
82108
| Nebula Algorithm Version | Nebula Version |
@@ -85,7 +111,8 @@ nebula-algorithm 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的
85111
| 2.1.0 | 2.0.0, 2.0.1 |
86112
| 2.5.0 | 2.5.0, 2.5.1 |
87113
| 2.6.0 | 2.6.0, 2.6.1 |
88-
| 2.5-SNAPSHOT | nightly |
114+
| 2.6.2 | 2.6.0, 2.6.1 |
115+
| 3.0-SNAPSHOT | nightly |
89116
90117
## 贡献
91118

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ nebula-algorithm is a Spark Application based on [GraphX](https://spark.apache.o
1313
| Louvain | community digging, hierarchical clustering|
1414
| KCore | community detection, financial risk control|
1515
| LabelPropagation | community detection, consultation propagation, advertising recommendation|
16+
| Hanp | community detection, consultation propagation|
1617
| ConnectedComponent | community detection, isolated island detection|
1718
|StronglyConnectedComponent| community detection|
1819
| ShortestPath | path plan, network plan|
1920
| TriangleCount | network structure analysis|
2021
| GraphTriangleCount | network structure and tightness analysis|
2122
| BetweennessCentrality | important node digging, node influence calculation|
23+
| ClosenessCentrality | important node digging, node influence calculation|
2224
| DegreeStatic | graph structure analysis|
2325
| ClusteringCoefficient | recommended, telecom fraud analysis|
26+
| Jaccard | similarity calculation, recommendation|
2427
| BFS | sequence traversal, Shortest path plan|
28+
| Node2Vec | graph machine learning, recommendation|
2529

2630

2731
You could submit the entire spark application or invoke algorithms in `lib` library to apply graph algorithms for DataFrame.
@@ -33,13 +37,13 @@ You could submit the entire spark application or invoke algorithms in `lib` libr
3337
$ cd nebula-algorithm
3438
$ mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
3539
```
36-
After the above buiding process, the target file `nebula-algorithm-2.0.0.jar` will be placed under `nebula-algorithm/target`.
40+
After the above buiding process, the target file `nebula-algorithm-3.0-SNAPSHOT.jar` will be placed under `nebula-algorithm/target`.
3741
3842
2. Download from Maven repo
3943
4044
Alternatively, it could be downloaded from the following Maven repo:
4145
42-
https://repo1.maven.org/maven2/com/vesoft/nebula-algorithm/2.0.0/
46+
https://repo1.maven.org/maven2/com/vesoft/nebula-algorithm/
4347
4448
## Use Nebula Algorithm
4549
@@ -52,7 +56,7 @@ You could submit the entire spark application or invoke algorithms in `lib` libr
5256
* Submit Spark Application
5357
5458
```
55-
${SPARK_HOME}/bin/spark-submit --master <mode> --class com.vesoft.nebula.algorithm.Main nebula-algorithm-2.0.0.jar -p application.conf
59+
${SPARK_HOME}/bin/spark-submit --master <mode> --class com.vesoft.nebula.algorithm.Main nebula-algorithm-3.0—SNAPSHOT.jar -p application.conf
5660
```
5761
5862
* Limitation
@@ -87,6 +91,27 @@ You could submit the entire spark application or invoke algorithms in `lib` libr
8791
For examples of other algorithms, see [examples](https://github.com/vesoft-inc/nebula-algorithm/tree/master/example/src/main/scala/com/vesoft/nebula/algorithm)
8892
> Note: The first column of DataFrame in the application represents the source vertices, the second represents the target vertices and the third represents edges' weight.
8993
94+
## Nebula config
95+
If you want to write the algorithm result into Nebula, make sure there is corresponding property name in your tag.
96+
| Algorithm | property name |property type|
97+
|:------------------------:|:-----------------------:|:-----------:|
98+
| pagerank | pagerank |double/string|
99+
| louvain | louvain | int/string |
100+
| kcore | kcore | int/string |
101+
| labelpropagation | lpa | int/string |
102+
| connectedcomponent | cc | int/string |
103+
|stronglyconnectedcomponent| scc | int/string |
104+
| betweenness | betweenness |double/string|
105+
| shortestpath | shortestpath | string |
106+
| degreestatic |degree,inDegree,outDegree| int/string |
107+
| trianglecount | trianglecount | int/string |
108+
| clusteringcoefficient | clustercoefficient |double/string|
109+
| closeness | closeness |double/string|
110+
| hanp | hanp | int/string |
111+
| bfs | bfs | string |
112+
| jaccard | jaccard | string |
113+
| node2vec | node2vec | string |
114+
90115
## Version match
91116
92117
| Nebula Algorithm Version | Nebula Version |
@@ -95,7 +120,8 @@ You could submit the entire spark application or invoke algorithms in `lib` libr
95120
| 2.1.0 | 2.0.0, 2.0.1 |
96121
| 2.5.0 | 2.5.0, 2.5.1 |
97122
| 2.6.0 | 2.6.0, 2.6.1 |
98-
| 2.5-SNAPSHOT | nightly |
123+
| 2.6.1 | 2.6.0, 2.6.1 |
124+
| 3.0-SNAPSHOT | nightly |
99125
100126
## Contribute
101127

0 commit comments

Comments
 (0)