Unverified Commit 5888d9d1 authored by Muhammed Fatih BALIN's avatar Muhammed Fatih BALIN Committed by GitHub
Browse files

[Doc] Labor sampling improvement (#5221)

* [Doc] Labor sampling improvement

When importance sampling option is used, the returned blocks include edge weights that need to be used during the message passing operation. So, I am including this in the documentation.

* Add documentation to weighted sampling case also
parent 4b5fa83b
...@@ -53,12 +53,16 @@ class LaborSampler(BlockSampler): ...@@ -53,12 +53,16 @@ class LaborSampler(BlockSampler):
prob : str, optional prob : str, optional
If given, the probability of each neighbor being sampled is proportional If given, the probability of each neighbor being sampled is proportional
to the edge feature value with the given name in ``g.edata``. to the edge feature value with the given name in ``g.edata``.
The feature must be a scalar on each edge. The feature must be a scalar on each edge. In this case, the returned
blocks edata include ``'edge_weights'`` that needs to be used in the
message passing operation.
importance_sampling : int, default ``0`` importance_sampling : int, default ``0``
Whether to use importance sampling or uniform sampling, use of negative Whether to use importance sampling or uniform sampling, use of negative
values optimizes importance sampling probabilities until convergence values optimizes importance sampling probabilities until convergence
while use of positive values runs optimization steps that many times. while use of positive values runs optimization steps that many times.
If the value is i, then LABOR-i variant is used. If the value is i, then LABOR-i variant is used. When used with a
nonzero parameter, the returned blocks edata include ``'edge_weights'``
that needs to be used in the message passing operation.
layer_dependency : bool, default ``False`` layer_dependency : bool, default ``False``
Specifies whether different layers should use same random variates. Specifies whether different layers should use same random variates.
Results into a reduction in the number of vertices sampled, but may Results into a reduction in the number of vertices sampled, but may
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment