# NLLLoss¶

class ampligraph.latent_features.NLLLoss(eta, loss_params=None, 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(-y \, f_{model}(t;\Theta)))$

where $$y \in {-1, 1}$$ is the label of the statement, $$\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[, loss_params, verbose]) Initialize Loss.
__init__(eta, loss_params=None, verbose=False)

Initialize Loss.

Parameters: eta (int) – Number of negatives. loss_params (dict) – Dictionary of hyperparams. No hyperparameters are required for this loss.