Research Article
A Static-Dynamic Hypergraph Neural Network Framework Based on Residual Learning for Stock Recommendation
Algorithm 1
Dynamic hypergraph construction.
| | Input: Input embedding X; Nearest neighbor parameter k | | | Output: Hyperedge set E; The set of vertices possessed by a hyperedge e pos(e) | | | Function: K-nearest neighborhood selection knn; Distance function dis; Smallest distance index selection topK | | (1) | for u in range (len (X)) do | | (2) | D = dis (X (u), X) | | (3) | D = sort (D) | | (4) | ind = topK (D, 2)-topK (D, 1) | | (5) | E. insert (ind) | | (6) | pos (ind). insert (u) | | (7) | end for | | (8) | for e in E do | | (9) | = knn (X[e], X, k) | | (10) | pos (e). insert () | | (11) | end for |
|