Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analytics add node2vec #1662

Merged
merged 1 commit into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 43 additions & 29 deletions docs-2.0/graph-computing/algorithm-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,35 +342,6 @@ Parameter descriptions are as follows:
|`ROOT`|Determined by `vid_type`| The VID of the source vertex.|
|`VISITED`|int| Outputs the number of the vertex accessed by `ROOT`.|

<!--
### Node2Vec

The Node2Vec algorithm proposed a more reasonable graph feature learning method based on DeepWalk, and proposed a semi-supervised algorithm for scalable feature learning in networks. SGD was used to optimize a custom graph-based objective function, which could maximize the network domain information of nodes reserved in d-dimensional feature space. Based on the random walk, a second order random walk process is designed, which is equivalent to an extension of DeepWalk algorithm, and preserves the graph characteristics of neighbor nodes. Applicable to node function similarity comparison, node structure similarity comparison, community clustering and other scenarios.R

!!! note

This algorithm is supported by NebulaGraph Algorithm only.

Parameter descriptions are as follows:

|Parameter|Predefined value|Description|
|:--|:--|:--|
|`maxIter`|`10`|Maximum number of iterations.|
|`lr`|`0.025`||
|`dataNumPartition`|`10`||
|`modelNumPartition`|`10`||
|`dim`|`10`|The map dimensions.|
|`window`|`3`||
|`walkLength`|`5`| The random step size.|
|`numWalks`|`3`| The number of random steps for each node.|
|`p`|`1.0`| The rollback parameters.|
|`q`|`1.0`|The forward parameters.|
|`directed`|`false`||
|`degree`|`30`||
|`embSeparate`|`","`||
|`modelPath`|`"hdfs://127.0.0.1:9000/model"`||
-->

## Community discovery

### LPA
Expand Down Expand Up @@ -559,6 +530,49 @@ Parameter descriptions are as follows:
|`VID2`|The same with `VID`| Outputs the ID of the vertex B that forms the triangle.|
|`VID3`|The same with `VID`| Outputs the ID of the vertex C that forms the triangle.|


### Node2Vec

The Node2Vec algorithm proposed a more reasonable graph feature learning method based on DeepWalk, and proposed a semi-supervised algorithm for scalable feature learning in networks. SGD was used to optimize a custom graph-based objective function, which could maximize the network domain information of nodes reserved in d-dimensional feature space. Based on the random walk, a second order random walk process is designed, which is equivalent to an extension of DeepWalk algorithm, and preserves the graph characteristics of neighbor nodes. Applicable to node function similarity comparison, node structure similarity comparison, community clustering and other scenarios.R

Parameter descriptions are as follows:


<!--
- NebulaGraph Algorithm

|Parameter|Predefined value|Description|
|:--|:--|:--|
|`maxIter`|`10`|Maximum number of iterations.|
|`lr`|`0.025`||
|`dataNumPartition`|`10`||
|`modelNumPartition`|`10`||
|`dim`|`10`|The map dimensions.|
|`window`|`3`||
|`walkLength`|`5`| The random step size.|
|`numWalks`|`3`| The number of random steps for each node.|
|`p`|`1.0`| The rollback parameters.|
|`q`|`1.0`|The forward parameters.|
|`directed`|`false`||
|`degree`|`30`||
|`embSeparate`|`","`||
|`modelPath`|`"hdfs://127.0.0.1:9000/model"`||
-->

- NebulaGraph Analytics
- Input parameters
|Parameter|Predefined value|Description|
|:--|:--|:--|
|`is_weighted`|`false`| Random walk with bias or not.|
|`p`|`1.0`| The backward bias for random walk.|
|`q`|`0.5`| The forward bias for random walk.|
|`epoch`|`1`| The number of iterations.|
|`step`|`10`| The number of steps per iteration.|
|`rate`|`0.02`| The rate of the random walk.|

- Output parameters
Output multiple columns where vertices in the same column are associated.

## Clustering

### ClusteringCoefficient
Expand Down
1 change: 1 addition & 0 deletions docs-2.0/graph-computing/nebula-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ NebulaGraph Analytics supports the following graph algorithms.
| BetweennessCentrality | Intermediate centrality | Node importance measurement|
| ClosenessCentrality | Closeness centrality | Node importance measurement|
| TriangleCount | It counts the number of triangles. | Graph feature |
| Node2Vec | Graph neural network | Graph feature |
| LPA | Label Propagation Algorithm | Community discovery |
| WCC | Weakly connected component | Community discovery |
| LOUVAIN | It detects communities in large networks. | Community discovery |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ There were [aggregated edges](../canvas-operations/visualization-mode.md) on the

Click **+** to add more edge types for property calculation.

![propertycalculation](https://docs-cdn.nebula-graph.com.cn/figures/propertycalculation-220913-en.png)
![propertycalculation](https://docs-cdn.nebula-graph.com.cn/figures/propertycalculation-220928-en.png)

### Method 2

Expand Down