Skip to content

JoostvDoorn/alpha-nDCG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

alpha-nDCG

Python implementation of alpha nDCG, tested with ndeval (test program code is provided, except no files to try them out).

Usage

Single query, returns score

from alpha_nDCG import AlphaNDCG
alpha_nDCG = AlphaNDCG('ndeval-format-qrel')
alpha_nDCG.compute(['docid1', 'docid2', 'docid3'], 'qid')

Multiple queries, returns dict of scores

alpha_nDCG.compute_multi([
	(['docid1', 'docid2', 'docid3'], 'qid1'),
	(['docid1', 'docid2', 'docid3'], 'qid2')
])

By default computes alpha-nDCG@20. To change depth:

alpha_nDCG.compute(['docid1', 'docid2', 'docid3'], 'qid', depth=20)

References

Clarke, Charles LA, et al. "Novelty and diversity in information retrieval evaluation." Proceedings of the 31st annual international ACM SIGIR conference on Research and development in information retrieval. ACM, 2008. [pdf]

About

Python implementation of alpha-nDCG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages