import evaluate as ev from nDCG import nDCG metric = nDCG(cache_dir="cache") a = [1,2,3,4,5] b = [1,2,3,4,5] c = [1,2,3,4,0] #metric.add(prediction=a, reference=b) metric.add(prediction=c, reference=b) metric.add(prediction=c, reference=b) metric.add(prediction=c, reference=b) print(metric.compute(predictions=[a], references=[b])) print(metric.compute(predictions=[a], references=[c])) print(metric.compute(predictions=[a], references=[c])) print(metric.compute(predictions=[a,a], references=[c,a])) print(metric.cache_file_name)