Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
adea4ba1
Unverified
Commit
adea4ba1
authored
Dec 13, 2019
by
Da Zheng
Committed by
GitHub
Dec 13, 2019
Browse files
fix doc. (#1100)
parent
869093e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
python/dgl/contrib/sampling/sampler.py
python/dgl/contrib/sampling/sampler.py
+13
-11
No files found.
python/dgl/contrib/sampling/sampler.py
View file @
adea4ba1
...
@@ -493,21 +493,23 @@ class EdgeSampler(object):
...
@@ -493,21 +493,23 @@ class EdgeSampler(object):
When negative edges are created, a batch of negative edges are also placed
When negative edges are created, a batch of negative edges are also placed
in a subgraph.
in a subgraph.
Currently, negative_mode only supports:
Currently, `negative_mode` only supports:
'head': the negative edges are generated by corrupting head nodes
with uniformly randomly sampled nodes,
* '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,
* '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
* '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.
from the graph. Please see Pytorch-BigGraph for more details.
'PBG-tail': the negative edges are generated by corrupting a set
* 'PBG-tail': the negative edges are generated by corrupting a set
\
of tail nodes with the same set of nodes similar to 'PBG-head'.
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
The sampler returns EdgeSubgraph, where a user can access the unique head nodes
and tail nodes directly.
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
if the generated negative edges are true negative edges and will return
a vector that indicates false negative edges. The vector is stored in
a vector that indicates false negative edges. The vector is stored in
the negative graph as `false_neg` edge data.
the negative graph as `false_neg` edge data.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment