besskge.loss

Functions for computing the batch loss based on the scores of positive and negative samples.

Classes

BaseLossFunction(*args, **kwargs)

Base class for a loss function.

LogSigmoidLoss(margin, ...[, ...])

The log-sigmoid loss function (see [SDNT19]).

MarginBasedLossFunction(margin, ...[, ...])

Base class for margin-based loss functions.

MarginRankingLoss(margin, ...[, ...])

The margin ranking (or pairwise hinge) loss function.

SampledSoftmaxCrossEntropyLoss(n_entity[, ...])

The sampled softmax cross-entropy loss (see [JCMB15] and [CJM+22]).