predict

predict(model, *, k=None, batch_size=1, mode=None)[source]

Calculate and store scores for either all triples, or the top k triples.

Parameters
  • model (Model) – A PyKEEN model

  • k (Optional[int]) – The number of triples to return. Set to None to keep all.

  • batch_size (int) – The batch size to use for calculating scores

  • mode (Optional[Literal[‘training’, ‘validation’, ‘testing’]]) – The pass mode, which is None in the transductive setting and one of “training”, “validation”, or “testing” in the inductive setting.

Return type

ScorePack

Returns

A score pack of parallel triples and scores