TransHRegularizer

class TransHRegularizer(*, weight=1.0, epsilon=1e-05, **kwargs)[source]

Bases: pykeen.regularizers.Regularizer

A regularizer for the soft constraints in TransH.

Initialize the regularizer.

Parameters
  • weight (float) – The relative weight of the regularization

  • epsilon (float) – a small value used to check for approximate orthogonality

  • kwargs – additional keyword-based parameters passed to Regularizer.__init__()

Attributes Summary

hpo_default

The default strategy for optimizing the TransH regularizer's hyper-parameters

Methods Summary

forward(x)

Compute the regularization term for one tensor.

update(*tensors)

Update the regularization term based on passed tensors.

Attributes Documentation

hpo_default: ClassVar[Mapping[str, Any]] = {'weight': {'high': 1.0, 'low': 0.01, 'scale': 'log', 'type': <class 'float'>}}

The default strategy for optimizing the TransH regularizer’s hyper-parameters

Methods Documentation

forward(x)[source]

Compute the regularization term for one tensor.

Return type

FloatTensor

update(*tensors)[source]

Update the regularization term based on passed tensors.

Return type

None