Negative Sampling¶
Negative sampling.
Name |
Reference |
---|---|
basic |
|
bernoulli |
Note
This table can be re-generated with pykeen ls samplers -f rst
Functions¶
|
Get the negative sampler class. |
Classes¶
|
A basic negative sampler. |
|
An implementation of the bernoulli negative sampling approach proposed by [wang2014]. |
Class Inheritance Diagram¶
Base Classes¶
- class NegativeSampler(triples_factory, num_negs_per_pos=None)[source]¶
A negative sampler.
Initialize the negative sampler with the given entities.
- Parameters
triples_factory (
TriplesFactory
) – The factory holding the triples to sample fromnum_negs_per_pos (
Optional
[int
]) – Number of negative samples to make per positive triple. Defaults to 1.