DistMultLiteral

class DistMultLiteral(triples_factory, embedding_dim=50, automatic_memory_optimization=None, input_dropout=0.0, loss=None, preferred_device=None, random_seed=None)[source]

Bases: pykeen.models.base.MultimodalModel

An implementation of DistMultLiteral from [agustinus2018].

Initialize the entity embedding model.

Parameters

relation_dim – The relation embedding dimensionality. If not given, defaults to same size as entity embedding dimension.

See also

Constructor of the base class pykeen.models.Model

See also

Constructor of the base class pykeen.models.EntityEmbeddingModel

Attributes Summary

hpo_default

The default strategy for optimizing the model’s hyper-parameters

loss_default_kwargs

The default parameters for the default loss function class

Methods Summary

compute_mr_loss(positive_scores, negative_scores)

Compute the mean ranking loss for the positive and negative scores.

score_t(hr_batch)

Forward pass using right side (tail) prediction for training with the LCWA.

Attributes Documentation

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 350, 'low': 50, 'q': 25, 'type': <class 'int'>}, 'input_dropout': {'high': 1.0, 'low': 0, 'type': <class 'float'>}}

The default strategy for optimizing the model’s hyper-parameters

loss_default_kwargs: ClassVar[Optional[Mapping[str, Any]]] = {'margin': 0.0}

The default parameters for the default loss function class

Methods Documentation

compute_mr_loss(positive_scores, negative_scores)[source]

Compute the mean ranking loss for the positive and negative scores.

Return type

Tensor

score_t(hr_batch)[source]

Forward pass using right side (tail) prediction for training with the LCWA.

Return type

Tensor