How to do negative sampling in latest update?

Since dgl.contrib.sampling is now being deprecated, I am wondering how to do negative sampling (as in GraphSAGE) in the latest update?

The documentation page for dgl.contrib.sampling links me to this page but from the Random Walk or the Neighbour sampling I’m not sure how it can be done.

For full-graph training, see https://docs.dgl.ai/guide/training-link.html. For sampling-based training, see https://docs.dgl.ai/guide/minibatch-link.html.

1 Like