Skip to content

Commit

Permalink
fix doc. (dmlc#1100)
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-da authored Dec 13, 2019
1 parent 869093e commit adea4ba
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions python/dgl/contrib/sampling/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,21 +493,23 @@ class EdgeSampler(object):
When negative edges are created, a batch of negative edges are also placed
in a subgraph.
Currently, negative_mode only supports:
'head': the negative edges are generated by corrupting head nodes
with uniformly randomly sampled nodes,
'tail': the negative edges are generated by corrupting tail nodes
with uniformly randomly sampled nodes,
'PBG-head': the negative edges are generated by corrupting a set
of head nodes with the same set of nodes uniformly randomly sampled
from the graph. Please see Pytorch-BigGraph for more details.
'PBG-tail': the negative edges are generated by corrupting a set
of tail nodes with the same set of nodes similar to 'PBG-head'.
Currently, `negative_mode` only supports:
* 'head': the negative edges are generated by corrupting head nodes with uniformly randomly sampled nodes,
* 'tail': the negative edges are generated by corrupting tail nodes with uniformly randomly sampled nodes,
* 'PBG-head': the negative edges are generated by corrupting a set \
of head nodes with the same set of nodes uniformly randomly sampled \
from the graph. Please see Pytorch-BigGraph for more details.
* 'PBG-tail': the negative edges are generated by corrupting a set \
of tail nodes with the same set of nodes similar to 'PBG-head'.
The sampler returns EdgeSubgraph, where a user can access the unique head nodes
and tail nodes directly.
When the flag return_false_neg is turned on, the sampler will also check
When the flag `return_false_neg` is turned on, the sampler will also check
if the generated negative edges are true negative edges and will return
a vector that indicates false negative edges. The vector is stored in
the negative graph as `false_neg` edge data.
Expand Down

0 comments on commit adea4ba

Please sign in to comment.