autointent.metrics.retrieval#

Retrieval metrics.

Classes#

RetrievalMetricFn

Protocol for retrieval metrics.

Functions#

retrieval_map(query_labels, candidates_labels[, k])

Calculate the mean average precision at position k.

retrieval_map_intersecting(query_labels, candidates_labels)

Calculate the mean average precision at position k for the intersecting labels.

retrieval_map_macro(query_labels, candidates_labels[, k])

Calculate the mean average precision at position k for the intersecting labels.

retrieval_hit_rate(query_labels, candidates_labels[, k])

Calculate the hit rate at position k.

retrieval_hit_rate_intersecting(query_labels, ...[, k])

Calculate the hit rate at position k for the intersecting labels.

retrieval_hit_rate_macro(query_labels, candidates_labels)

Calculate the hit rate at position k for the intersecting labels.

retrieval_precision(query_labels, candidates_labels[, k])

Calculate the precision at position k.

retrieval_precision_intersecting(query_labels, ...[, k])

Calculate the precision at position k for the intersecting labels.

retrieval_precision_macro(query_labels, candidates_labels)

Calculate the precision at position k for the intersecting labels.

retrieval_ndcg(query_labels, candidates_labels[, k])

Calculate the Normalized Discounted Cumulative Gain (NDCG) at position k.

retrieval_ndcg_intersecting(query_labels, ...[, k])

Calculate the Normalized Discounted Cumulative Gain (NDCG) at position k for the intersecting labels.

retrieval_ndcg_macro(query_labels, candidates_labels)

Calculate the Normalized Discounted Cumulative Gain (NDCG) at position k for the intersecting labels.

retrieval_mrr(query_labels, candidates_labels[, k])

Calculate the Mean Reciprocal Rank (MRR) at position k.

retrieval_mrr_intersecting(query_labels, candidates_labels)

Calculate the Mean Reciprocal Rank (MRR) at position k for the intersecting labels.

retrieval_mrr_macro(query_labels, candidates_labels[, k])

Calculate the Mean Reciprocal Rank (MRR) at position k for the intersecting labels.