gammagl.utils¶
calculate GCN Normalization. |
|
segment softmax function. |
|
Row-wise sorts |
|
Row-wise sorts |
|
Converts the graph given by |
|
Returns |
|
Computes the (unweighted) degree of a given one-dimensional index tensor. |
|
Adds a self-loop \((i,i) \in \mathcal{E}\) to every node \(i \in \mathcal{V}\) in the graph given by |
|
Removes every self-loop in the graph given by |
|
Converts a mask to an index representation. |
|
Converts indices to a mask representation. |
|
Given a sparse batch of node features \(\mathbf{X} \in \mathbb{R}^{(N_1 + \ldots + N_B) \times F}\) (with \(N_i\) indicating the number of nodes in graph \(i\)), creates a dense node feature tensor \(\mathbf{X} \in \mathbb{R}^{B \times N_{\max} \times F}\) (with \(N_{\max} = \max_i^B N_i\)). |
|
Computes the induced subgraph of |
|
Samples random negative edges of a graph given by |
|
Converts a graph given by edge indices and edge attributes to a scipy sparse matrix. |
|
read pre trained and learned node embeddings |
|
The homophily of a graph characterizes how likely nodes with the same label are near each other in a graph. |