pairwise

Pairwise loss functions for the Lightning IR framework.

This module contains loss functions that operate on pairs of items, comparing positive and negative examples.

Classes

ConstantMarginMSE([margin])

Constant Margin MSE loss for pairwise ranking tasks with a fixed margin.

MarginMSE([margin])

Mean Squared Error loss with a margin for pairwise ranking tasks.

RankNet([temperature])

RankNet loss function for pairwise ranking tasks.

SupervisedMarginMSE()

Supervised Margin MSE loss for pairwise ranking tasks with a dynamic margin.