Handbook
Glossary
ndcg ( scores -- ndcg )
Statistics
Prev:
dcg ( scores -- dcg )
Vocabulary
math
.
statistics
Inputs
scores
a
sequence
Outputs
ndcg
a
number
Word description
Calculates the normalized discounted cumulative gain from a list of scores. The ndcg is the discounted cumulative gain divided by the theoretical maximum dcg for the given list.
See
https://en.wikipedia.org/wiki/Discounted_cumulative_gain
See also
dcg
Definition
USING:
kernel
math
sequences
sorting
;
IN:
math.statistics
:
ndcg
( scores -- ndcg )
[
0.0
]
[
dup
dcg
[
drop
0.0
]
[
swap
sort
<reversed>
dcg
/f
]
if-zero
]
if-empty
;