OGBEvaluator
- class OGBEvaluator(filtered=False, **kwargs)[source]
Bases:
SampledRankBasedEvaluator
A sampled, rank-based evaluator that applies a custom OGB evaluation.
Initialize the evaluator.
- Parameters:
evaluation_factory – the factory with evaluation triples
additional_filter_triples – additional true triples to use for filtering; only relevant if not explicit negatives are given. cf.
pykeen.evaluation.rank_based_evaluator.sample_negatives()
num_negatives – the number of negatives to sample; only relevant if not explicit negatives are given. cf.
pykeen.evaluation.rank_based_evaluator.sample_negatives()
head_negatives – shape: (num_triples, num_negatives) the entity IDs of negative samples for head prediction for each evaluation triple
tail_negatives – shape: (num_triples, num_negatives) the entity IDs of negative samples for tail prediction for each evaluation triple
kwargs – additional keyword-based arguments passed to
pykeen.evaluation.rank_based_evaluator.RankBasedEvaluator.__init__()
filtered (bool) –
- Raises:
ValueError – if only a single side’s negatives are given, or the negatives are in wrong shape
Methods Summary
evaluate
(model, mapped_triples[, ...])Run
evaluate_ogb()
with this evaluator.Methods Documentation