pyepo.func.jax.rank

Learning to rank Losses

Attributes

Classes

listwiseLearningToRank

Listwise Learning-to-Rank loss over a cached solution pool.

pairwiseLearningToRank

Pairwise Learning-to-Rank loss over a cached solution pool.

pointwiseLearningToRank

Pointwise Learning-to-Rank loss over a cached solution pool.

Module Contents

class pyepo.func.jax.rank.listwiseLearningToRank(optmodel, processes=1, solve_ratio=1.0, reduction: pyepo.func.runtime.Reduction = 'mean', dataset=None)

Bases: pyepo.func.jax.abcmodule.optModule

Listwise Learning-to-Rank loss over a cached solution pool.

Models the ranking distribution over the pool as a SoftMax of predicted-cost scores and minimizes its cross-entropy against the true ranking distribution.

Reference: Mandi et al. (2022) https://proceedings.mlr.press/v162/mandi22a.html

forward(pred_cost, true_cost)

Forward pass

class pyepo.func.jax.rank.pairwiseLearningToRank(optmodel, processes=1, solve_ratio=1.0, reduction: pyepo.func.runtime.Reduction = 'mean', dataset=None)

Bases: pyepo.func.jax.abcmodule.optModule

Pairwise Learning-to-Rank loss over a cached solution pool.

Enforces a margin between the true optimum (best pool member) and each suboptimal solution via a ReLU hinge on the predicted-cost difference.

Reference: Mandi et al. (2022) https://proceedings.mlr.press/v162/mandi22a.html

forward(pred_cost, true_cost)

Forward pass

class pyepo.func.jax.rank.pointwiseLearningToRank(optmodel, processes=1, solve_ratio=1.0, reduction: pyepo.func.runtime.Reduction = 'mean', dataset=None)

Bases: pyepo.func.jax.abcmodule.optModule

Pointwise Learning-to-Rank loss over a cached solution pool.

Fits the predicted score of each pool member toward its true score by squared error, averaged over the pool.

Reference: Mandi et al. (2022) https://proceedings.mlr.press/v162/mandi22a.html

forward(pred_cost, true_cost)

Forward pass

pyepo.func.jax.rank.lsLTR
pyepo.func.jax.rank.prLTR
pyepo.func.jax.rank.ptLTR