ComplEx

class ComplEx(*, embedding_dim: int = 200, entity_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function normal_>, relation_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function normal_>, regularizer: str | ~pykeen.regularizers.Regularizer | type[~pykeen.regularizers.Regularizer] | None = <class 'pykeen.regularizers.LpRegularizer'>, regularizer_kwargs: ~collections.abc.Mapping[str, ~typing.Any] | None = None, **kwargs)[source]

基础类:ERModel

ComplEx的一个实现[trouillon2016]

ComplEx模型结合了复数值的pykeen.nn.Embedding实体和关系表示与pykeen.nn.ComplExInteraction

初始化ComplEx。

Parameters:

属性摘要

hpo_default

优化模型超参数的默认策略

loss_default_kwargs

默认损失函数类的默认参数

regularizer_default_kwargs

用于ComplEx的[trouillon2016]的LP设置。

属性文档

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}}

优化模型超参数的默认策略

loss_default_kwargs: ClassVar[Mapping[str, Any]] = {'reduction': 'mean'}

默认损失函数类的默认参数

regularizer_default_kwargs: ClassVar[Mapping[str, Any]] = {'normalize': True, 'p': 2.0, 'weight': 0.01}

用于ComplEx的[trouillon2016]的LP设置。