approximate

Approximate ranking loss functions for the Lightning IR framework.

This module contains loss functions that use approximation techniques to compute ranking-based metrics like NDCG, MRR, and RankMSE in a differentiable manner.

Classes

ApproxLossFunction([temperature])

Base class for approximate loss functions that compute ranks from scores.

ApproxMRR([temperature])

Approximate Mean Reciprocal Rank (MRR) loss function for ranking tasks.

ApproxNDCG([temperature, scale_gains])

Approximate NDCG loss function for ranking tasks.

ApproxRankMSE([temperature, discount])

Approximate Rank Mean Squared Error (RankMSE) loss function for ranking tasks.