Edge Weight Normalization

Hello,
I would like to normalize the edge weights of outgoing edges of each node by dividing them by the sum of the edge weights of all outgoing edges of that node. I thought I could use the method dgl.DGLGraph.group_apply_edges but it is removed after 0.5.x.
I want to normalize the outgoing edges because I want to apply dgl.sampling.node2vec_random_walk to the graph and I couldn’t find out if the this method normalizes the edge weights internally.
Is there another method to use or could someone tell me if dgl.sampling.node2vec_random_walk normalized the edge weights internally?

Thank you :slight_smile:

dgl.sampling.node2vec_random_walk allows unnormalized probabilities for prob based on its documentation: dgl.sampling.node2vec_random_walk — DGL 1.0.1 documentation

You can also normalize the edge weights with the sparse matrix APIs since v1.0: 🆕 dgl.sparse — DGL 1.0.1 documentation

1 Like

Thank you for your answer! :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.