Helper function for document-wise computation of ranked retrieval scores DCG, NDCG and LRAP. Implemented as in Annif https://github.com/NatLibFi/Annif/blob/master/annif/eval.py. Reference implementation for NDCG to test against.

ndcg_score(gold_vs_pred, limit = NULL)

Arguments

gold_vs_pred

A data.frame as generated by create_comparison.

limit

An integer cutoff value for NDCG@N.

Value

The numeric value of NDCG.