Research Article
Context Attention Heterogeneous Network Embedding
Algorithm 1
Structure-based embedding with node importance.
| Input: network G, context node sampling parameter k, dimensionality , and learning rate η | | Output: -dimensional embedding results H | (1) | Initialize nodes’ relational trees by performing BFS on G starting from each node; | (2) | Obtain a context node sequence S by sampling context nodes layer by layer for each anchor node according to k; | (3) | for i = 1 to do | (4) | Calculate by equation (4); | (5) | end for | (6) | while not convergence do | (7) | Update the value of loss function equation (8) and node representations H by the Adam algorithm with learning rate η; | (8) | end while | (9) | Return H; |
|