Skip to content

Metric

In PT-Ranking, the widely used IR metrics, such as precision, average precision, nDCG and ERR, are included.

Definition

For the definition of each metric, please refer to ptranking_ir_metric.ipynb for a brief description.

Implementation

For the implementation based on PyTorch, please refer to adhoc_metric.py and testing_metric.py for a reference.