NLLLoss¶
-
class
ampligraph.latent_features.
NLLLoss
(eta, hyperparam_dict={}, verbose=False)¶ Negative log-likelihood loss.
As described in [TWR+16].
\[\mathcal{L}(\Theta) = \sum_{t \in \mathcal{G} \cup \mathcal{C}}log(1 + exp(-yf_{model}(t;\Theta)))\]where \(y\) is the label of the statement :math:` in [-1, 1]`, \(\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={}, verbose=False)¶ Initialize Loss.
Parameters: - eta (int) – number of negatives
- hyperparam_dict (dict) – dictionary of hyperparams. No hyperparameters are required for this loss.
-