EvaluationOnlyModel

class EvaluationOnlyModel(triples_factory)[source]

Bases: Model

A model which only implements the methods used for evaluation.

Non-parametric models take a minimal set of arguments.

Parameters

triples_factory (CoreTriplesFactory) – The training triples factory is used to assign the number of entities, relations, and inverse condition in the non-parametric model.

Attributes Summary

can_slice_h

can_slice_r

can_slice_t

Methods Summary

collect_regularization_term()

Non-parametric models do not implement Model.collect_regularization_term().

score_hrt(hrt_batch, **kwargs)

Non-parametric models do not implement Model.score_hrt().

score_r(ht_batch, **kwargs)

Non-parametric models do not implement Model.score_r().

Attributes Documentation

can_slice_h: ClassVar[bool] = False
can_slice_r: ClassVar[bool] = False
can_slice_t: ClassVar[bool] = False

Methods Documentation

collect_regularization_term()[source]

Non-parametric models do not implement Model.collect_regularization_term().

score_hrt(hrt_batch, **kwargs)[source]

Non-parametric models do not implement Model.score_hrt().

Parameters

hrt_batch (LongTensor) –

score_r(ht_batch, **kwargs)[source]

Non-parametric models do not implement Model.score_r().

Parameters

ht_batch (LongTensor) –