AbsoluteMarginLoss¶
-
class
ampligraph.latent_features.
AbsoluteMarginLoss
(eta, hyperparam_dict={'margin': 1}, verbose=False)¶ Absolute margin , max-margin loss.
Introduced in [HOSM17].\[\mathcal{L}(\Theta) = \sum_{t^+ \in \mathcal{G}}\sum_{t^- \in \mathcal{C}} f_{model}(t^-;\Theta) - max(0, [\gamma - f_{model}(t^+;\Theta)])\]where \(\gamma\) is the margin, \(\mathcal{G}\) is the set of positives, \(\mathcal{C}\) is the set of corruptions, \(f_{model}(t;\Theta)\) is the model-specific scoring function.
Methods
__init__
(eta[, hyperparam_dict, verbose])Initialize Loss -
__init__
(eta, hyperparam_dict={'margin': 1}, verbose=False)¶ Initialize Loss
Parameters: - eta (int) – number of negatives
- hyperparam_dict (dict) –
dictionary of hyperparams.
- margin: float. Margin to be used in loss computation (default:1)
-